Card Development Questions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card Development Questions
by Chris H. » 25 Dec 2010, 17:31
`
I too had some difficulty with Python and the first script that Sol released. My memory is not what it used to be.
Double clicking on the script file launches the Python shell and loads the script into Python, but the script does not automatically run as part of this. I just did the above on my Mac and the Python shell window states:
- Code: Select all
IDLE 2.6.1
>>>
There is some sort of a run command that will run the script and I think that it is bound to one of the F keys. I just opened the Python preferences and under keys it states:
- Code: Select all
run-module - <Key-F5>
When I hit F5 I get a notice about tabs and spaces. It tells you how to replace the tabs with spaces and you then save the edited script. At this point the Python shell states:
- Code: Select all
This script requires the text version of Arch's mtg-data to be present.You can download it from slightlymagic.net's forum and either place the text version next to this script or edit this script and provide the path to the file at the top.
Press Enter to exit
I hope that this is enough to get started. Let us know how it worked out.
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Card Development Questions
by SoulStorm » 25 Dec 2010, 17:49
Thanks Chris, I'll play around with the data you gave me and let you know how things went.
Re: Card Development Questions
by SoulStorm » 26 Dec 2010, 05:03
Update:
So I feel as though I'm going through some sort of rite of passage.
I figured out how to run the scripts, learned not to put spaces in the names of Eclipse projects , found mtg-data, fixed the tab error, and then fixed multiple errors (in the setInfoScript and the PerSetTracking scripts) due to changes in syntax in the 3.1 version of python I'm using (involving print and raw_input).
Now I have another error that may not be so easy to fix:
Traceback <most recent call last.:
File "\Users\Soulstorm\workspace\ForgeSVN\res\SetInfoScript.py", line 4, in <module>
from httplib import HTTP
ImportError: No module named httplib
WOW! This experience has been both frustrating and strangely entertaining. Kind of like my experiences with Calculus, Physics, and Mandarin in college.
So I feel as though I'm going through some sort of rite of passage.
I figured out how to run the scripts, learned not to put spaces in the names of Eclipse projects , found mtg-data, fixed the tab error, and then fixed multiple errors (in the setInfoScript and the PerSetTracking scripts) due to changes in syntax in the 3.1 version of python I'm using (involving print and raw_input).
Now I have another error that may not be so easy to fix:
Traceback <most recent call last.:
File "\Users\Soulstorm\workspace\ForgeSVN\res\SetInfoScript.py", line 4, in <module>
from httplib import HTTP
ImportError: No module named httplib
WOW! This experience has been both frustrating and strangely entertaining. Kind of like my experiences with Calculus, Physics, and Mandarin in college.
Re: Card Development Questions
by slapshot5 » 26 Dec 2010, 06:34
The easiest thing to do is forget the script. I've never run it myself. Before a beta is released, someone will run the script and take care of all the cards that have been submitted.SoulStorm wrote:Update:
So I feel as though I'm going through some sort of rite of passage.
I figured out how to run the scripts, learned not to put spaces in the names of Eclipse projects , found mtg-data, fixed the tab error, and then fixed multiple errors (in the setInfoScript and the PerSetTracking scripts) due to changes in syntax in the 3.1 version of python I'm using (involving print and raw_input).
Now I have another error that may not be so easy to fix:
Traceback <most recent call last.:
File "\Users\Soulstorm\workspace\ForgeSVN\res\SetInfoScript.py", line 4, in <module>
from httplib import HTTP
ImportError: No module named httplib
WOW! This experience has been both frustrating and strangely entertaining. Kind of like my experiences with Calculus, Physics, and Mandarin in college.
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Card Development Questions
by SoulStorm » 26 Dec 2010, 06:46
Well then, I think we have a winner.
Before you posted this Slapshot, I found what I believe is the module I need to install in order to fix the error. However, running a python file and installing a python module are two different things, and the latter is still proving difficult to accomplish.
For now I'm going to taking your advice and submit what I have without running the script. Perhaps later someone will be able to tell me precicely how to install these python modules.
Thanks Again!
Before you posted this Slapshot, I found what I believe is the module I need to install in order to fix the error. However, running a python file and installing a python module are two different things, and the latter is still proving difficult to accomplish.
For now I'm going to taking your advice and submit what I have without running the script. Perhaps later someone will be able to tell me precicely how to install these python modules.
Thanks Again!
Re: Card Development Questions
by SoulStorm » 26 Dec 2010, 08:24
After I added Bloodfire Kavu and Whip Silk to the SVN, I tried to add Bloodfire Dwarf, but when I synchronized, it wasn't detected as a change. Has this happened to anyone else, if so, how was the problem resolved?
Re: Card Development Questions
by slapshot5 » 26 Dec 2010, 15:43
Does it show up in your Package Explorer in Eclipse?SoulStorm wrote:After I added Bloodfire Kavu and Whip Silk to the SVN, I tried to add Bloodfire Dwarf, but when I synchronized, it wasn't detected as a change. Has this happened to anyone else, if so, how was the problem resolved?
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Card Development Questions
by SoulStorm » 26 Dec 2010, 16:28
Yes, as does Silklash Spider which I added recently.
I even deleted the project, shut down my computer to purge the ram, imported the project again under a different name, and added the files again, yet I still have the same problem.
I even deleted the project, shut down my computer to purge the ram, imported the project again under a different name, and added the files again, yet I still have the same problem.
Re: Card Development Questions
by SoulStorm » 26 Dec 2010, 16:42
Ahh, clever Slapshot, I just noticed that you can commit a revision from package explorer even if synchronize doesn't detect a change. Still it is odd that these changes aren't detected.
Re: Card Development Questions
by slapshot5 » 26 Dec 2010, 16:43
Do you have both incoming and outgoing shown in the Synchronize View?SoulStorm wrote:Yes, as does Silklash Spider which I added recently.
I even deleted the project, shut down my computer to purge the ram, imported the project again under a different name, and added the files again, yet I still have the same problem.
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Card Development Questions
by SoulStorm » 26 Dec 2010, 16:56
No changes are shown in either view. In fact, I just noticed that neither synchronize nor refresh show any incoming changes either. Somehow things got very messed up. Perhaps I should try changing the workspace or if necessary reinstalling Eclipse?
Re: Card Development Questions
by slapshot5 » 26 Dec 2010, 17:06
something seems wonky. can you post a screenshot?
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Card Development Questions
by slapshot5 » 26 Dec 2010, 17:51
Well, Project Explorer shows there are changes. But maybe your SVN isn't hooked up correctly?
In Synchronize, go to Synchronize... to bring up the Properties. Click Next. On the Synchronize SVN screen, is you Scope set to Workspace and is Available resources checked for ForgeSVN?
In Synchronize, go to Synchronize... to bring up the Properties. Click Next. On the Synchronize SVN screen, is you Scope set to Workspace and is Available resources checked for ForgeSVN?
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Card Development Questions
by SoulStorm » 26 Dec 2010, 18:01
Well, I'll check those things after I finish using the hammer technique of software repair. I uninstalled everything and am starting over.
Who is online
Users browsing this forum: No registered users and 49 guests