No module named paths

72 views
Skip to first unread message

OlyDLG

unread,
Mar 2, 2011, 1:30:49 AM3/2/11
to Gummworld2
Downloaded/tried to run 00_minimum.py, got ImportError: no module
named paths--what is paths and where do I get it?

B W

unread,
Mar 2, 2011, 10:16:30 AM3/2/11
to gummw...@googlegroups.com
Hi. There is a paths.py in gummworld2/ (base distribution directory) and gummworld2/examples directory.

I guess you found an issue. Thinking ahead, without much to go on at this point...

* If you are working in a file manager double-clicking an example *should* work fine. I have only tried this in Windows.
* If you are working in a shell then change working directory to gummworld2/examples and run the examples from there.
* If you are working in an editor or IDE, then you'll need to set your editor up so Python finds gummworld2/examples/paths.py.
* If any of the above doesn't work you may need to add either "." (dot) or the full path to the paths.py file, minus the file part, to your PYTHONPATH environment variable.

If you wouldn't mind, please enter an issue report on the Google Code project site and include information about your environment and the steps I can use to reproduce your error. I will see what I can do for the next release.

Thanks.

Gumm

B W

unread,
Mar 2, 2011, 10:42:28 AM3/2/11
to gummw...@googlegroups.com
A follow-up on this.

In a Windows shell the following work for me ($ is the command prompt):

My PYTHONPATH has "." in it.

$ gummworld2\examples\00_minimum.py
$ examples\00_minimum.py
$ 00_minimum.py

My editor is MrPython. It appears to change working directory to the source file when running it.

The file manager I use in Ubuntu does not seem to know what to do with Python source files.

Hopes this info helps you troubleshoot your environment.

Gumm

B W

unread,
Mar 2, 2011, 10:53:28 AM3/2/11
to gummw...@googlegroups.com
One more idea occured to me. If you have only downloaded the file 00_minimum.py, it will not work by itself. :) You need to download the full gummworld2 release.

That is all I can think of for now. Please let me know how it goes. I am interested in learning what you discover. If you still cannot get it working, send more info and I will try to assist further.

Gumm

David Goldsmith

unread,
Mar 2, 2011, 12:36:05 PM3/2/11
to gummw...@googlegroups.com
On Wed, Mar 2, 2011 at 7:53 AM, B W <stabbin...@gmail.com> wrote:
One more idea occured to me. If you have only downloaded the file 00_minimum.py, it will not work by itself. :) You need to download the full gummworld2 release.

That is the problem: I assumed minimal meant minimal; IMHO, you have misnamed the file...

DG
 



--
In science it often happens that scientists say, 'You know that's a really good argument; my position is mistaken,' and then they would actually change their minds and you never hear that old view from them again. They really do it. It doesn't happen as often as it should, because scientists are human and change is sometimes painful. But it happens every day. I cannot recall the last time something like that happened in politics or religion.

- Carl Sagan, 1987 CSICOP address



B W

unread,
Mar 2, 2011, 5:00:22 PM3/2/11
to gummw...@googlegroups.com
Well... it is, as documented, the minimum to use a scrolling map _in Gummworld2_. Which implies that the Gummworld2 library is required. Sorry you didn't make the connection, and that I didn't foresee that eventuality. :)

I shall improve the example so it prints a friendlier message, like "Cannot find Gummworld2 - do you have it installed?"

For what it's worth, that example was posted so people could see the small size and simple construction of a basic program that does something as laborious as scrolling a huge map. If that is the only example you run, you would be disappointed. There are a number of examples in the distribution that are far more impressive, both for what they do and how little code it takes. I recommend getting the distro and trying all the examples.

Thanks for pointing this out.

bw

David Goldsmith

unread,
Mar 2, 2011, 5:32:48 PM3/2/11
to gummw...@googlegroups.com
Understood, I do hope/intend to use it as you state.

You are probably in the right, in that if I had been a little more patient I perhaps would have seen the error of my ways.  My reasoning was: why download and install the whole kit and kaboodle before I know it will suit my needs, _if_ there _appears_ to be a "minimal" which I can run and make a preliminary assessment.  Perhaps "the solution" is as simple as "hiding" the minimal in examples or some such, so that one is more likely to download and install the whole thing before making the mistake I made. :-)

Thanks!

DG

B W

unread,
Mar 2, 2011, 7:28:43 PM3/2/11
to gummw...@googlegroups.com
On Wed, Mar 2, 2011 at 2:32 PM, David Goldsmith <d.l.go...@gmail.com> wrote:
Understood, I do hope/intend to use it as you state.

You are probably in the right, in that if I had been a little more patient I perhaps would have seen the error of my ways.  My reasoning was: why download and install the whole kit and kaboodle before I know it will suit my needs, _if_ there _appears_ to be a "minimal" which I can run and make a preliminary assessment. 

You make a great point. I certainly don't want to mislead when it can cause this kind of misunderstanding. =)
 
Perhaps "the solution" is as simple as "hiding" the minimal in examples or some such, so that one is more likely to download and install the whole thing before making the mistake I made. :-)

I considered removing the demo file from the download page. But there is also the code on the wiki. If someone pastes it and wastes his/her valuable time looking for paths.py, that would not be a good endorsement for Gummworld2. I will do both: remove the file from the download page, and add a friendlier message in an exception handler in case paths or gummworld2 are missing.

I appreciate the help you've given me thinking this through. And I hope you find Gummworld2 is worth the effort of a download. I've been writing it for myself, almost entirely without input or feedback. But I have kept general use and other people in mind. I would love to hear about your experiences with Gummworld2 if you care to share.

Gumm

David Goldsmith

unread,
Mar 2, 2011, 11:41:23 PM3/2/11
to gummw...@googlegroups.com
Next prob: I downloaded gummworld2-0.1.0.zip, extracted, looked for setup.py, didn't find it, found INSTALL.txt, opened it to read, and what does it tell me: install w/ "python setup.py install"!  Where is it?!

DG

B W

unread,
Mar 3, 2011, 12:42:03 AM3/3/11
to gummw...@googlegroups.com
You don't need to install it. Just unzip and run the examples.

You must be looking at the install doc for pgu: gummworld2/docs/third_party/pgu-0.14/INSTALL.txt? Those are third-party docs. pgu's GUI package is bundled with Gummworld2 because I fixed a few bugs that haven't been released yet by the pgu maintainer. Including pgu's license and other readmes seemed like a good idea at the time.

I guess I should add a readme in the distribution root that explains what and where things are.

bw

David Goldsmith

unread,
Mar 3, 2011, 2:06:19 AM3/3/11
to gummw...@googlegroups.com
OK, got it working: very nice!  I look forward to working w/ it!  Thanks!

DG

B W

unread,
Mar 3, 2011, 11:30:50 AM3/3/11
to gummw...@googlegroups.com
Excellent. Going to enter Pyweek? :) I plan to.

Gumm

David Goldsmith

unread,
Mar 3, 2011, 11:39:24 AM3/3/11
to gummw...@googlegroups.com
Unfortunately, no. :-(

B W

unread,
Mar 3, 2011, 11:54:22 AM3/3/11
to gummw...@googlegroups.com
I want to try it, even though I was planning on working that week. But now it occurs to me I really could use a break. Maybe I will take the week off and immerse myself. Many of the old hands are quite creative. I will probably get stomped and ground in. But what da heck: no guts, no glory. =)

Gumm

On Thu, Mar 3, 2011 at 8:39 AM, David Goldsmith <d.l.go...@gmail.com> wrote:
Unfortunately, no. :-(


David Goldsmith

unread,
Mar 3, 2011, 12:10:20 PM3/3/11
to gummw...@googlegroups.com
Well, BoL2U.

DG

B W

unread,
Mar 4, 2011, 10:17:39 AM3/4/11
to gummw...@googlegroups.com
Do you have something in mind yet, DG? I'm curious, not prying. It's okay if you want to keep it a secret. :)

Gumm

David Goldsmith

unread,
Mar 4, 2011, 12:18:22 PM3/4/11
to gummw...@googlegroups.com
No, no big secret: my son is a Pokemon fanatic and he's always harping
on me that he wants to make his own Pokemon game and I want to call
his bluff. ;-) (Also, he made up a dice grid-board game several,
several years ago, and I've always had it in the back of my head to
implement that also, and I think I may be ready finally, though I'm
not sure I'll use pygame for that one, probably just wx since I know
that better and wx is well-enough-suited for regular grid stuff.)

DG

--

B W

unread,
Mar 5, 2011, 11:45:05 AM3/5/11
to gummw...@googlegroups.com
Ahh. I've never played a Pokemon game, but I got hit by some photons when my kids watched the animated series. :) Seems like an excellent theme for an action or action-RPG game.

For me the rough part is always the artwork. I saw plenty of Pokemon spritesheets while recently prowling for art. Many were ripped from commercial game cartridges (SNES copyright, e.g.), but I saw some public domain fan art sets too.

You should set a ladder of mini challenges for him to ramp up his skills.

Gumm

David Goldsmith

unread,
Mar 5, 2011, 2:17:16 PM3/5/11
to gummw...@googlegroups.com
Oh, I'm doing the programming, he's doing the creative side: I'm the
brains, he's the brawn. (He has a disability which impacts his
ability to type, so long term I'm going to write a "visual" Python
object creator, but I think if he sees that it is possible for an
"ordinary Joe"--i.e., not a professional game programmer--to write a
game w/ Python, he'll be more motivated to learn how to use it.)

DG

--

B W

unread,
Mar 6, 2011, 8:14:16 PM3/6/11
to gummw...@googlegroups.com
I seem to recall at least two aborted attempts at pygame game makers/editors on pygame.org. Might be something interesting and/or reusable there. Also, if you haven't already, check out the cookbook on pygame.org, where you'll find a number of Python and pygame recipes that often make great nuts-n-bolts for projects.

Father-son teamwork. That is too cool. I hope to see what you guys cook up. :)

Gumm
Reply all
Reply to author
Forward
0 new messages