Re: [google-appengine] Re: groc module
peter et. al, i can't believe i didn't notice this the first time when you asked about your problem several months ago. if you take a careful look at the files, you'll see that your permissions are not set correctly: : -r-xr-x--- 1 admin admin 646 Dec 14 15:22 __init__.py -r-xr-x--- 1 admin admin 313 Dec 27 23:02 __init__.pyc -r-xr-x--- 1 admin admin 1909 Dec 14 15:22 groc.py -r-xr-x--- 1 admin admin 3050 Dec 27 23:02 groc.pyc -r-xr-xr-x@ 1 admin admin 9673 Dec 14 15:22 groctimespecification.py -r-xr-xr-x 1 admin admin 12133 Dec 27 23:02 groctimespecification.pyc : i don't know whether it was due to the installation or if your administrator installed it that way. you just need to go into the directory and change the permissions, i.e., chmod o+r * (or a+r) -- you need to do this for any other directory which has the incorrect file perms. this is an old ticket that needs to be resolved: please star and/or comment on this ticket as necessary: http://code.google.com/p/googleappengine/issues/detail?id=725 cheers, -- wesley - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Core Python Programming, Prentice Hall, (c)2007,2001 Python Fundamentals, Prentice Hall, (c)2009 http://corepython.com wesley.j.chun :: wesc+...@google.com developer relations :: google app engine -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: groc module
Hi Wesley, thanks for the reply. can you doublecheck that directory to ensure that it's still there? unfortunately, i only have 2.5 on my machine so i can't confirm whether it works (or doesn't) in 2.6. Yup, it's all there: /usr/local/google_appengine/google/appengine/cron $ ls total 280 drwxr-xr-x 12 admin admin408 Dec 27 23:02 . drwxr-xr-x 12 admin admin408 Dec 27 23:02 .. -r-xr-xr-x@ 1 admin admin 27794 Dec 14 15:22 GrocLexer.py -r-xr-xr-x 1 admin admin 26294 Dec 27 23:02 GrocLexer.pyc -r-xr-xr-x@ 1 admin admin 24143 Dec 14 15:22 GrocParser.py -r-xr-xr-x 1 admin admin 20040 Dec 27 23:02 GrocParser.pyc -r-xr-x--- 1 admin admin646 Dec 14 15:22 __init__.py -r-xr-x--- 1 admin admin313 Dec 27 23:02 __init__.pyc -r-xr-x--- 1 admin admin 1909 Dec 14 15:22 groc.py -r-xr-x--- 1 admin admin 3050 Dec 27 23:02 groc.pyc -r-xr-xr-x@ 1 admin admin 9673 Dec 14 15:22 groctimespecification.py -r-xr-xr-x 1 admin admin 12133 Dec 27 23:02 groctimespecification.pyc One thing I suspect now is that in trying to wipe out my old install and redo it, I did only a partial job. But I'm still kind of stumped. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: groc module
ok, well that's good to know that it's still there. i'm kinda of stumped too. can you try one thing for me? 1) undo the manual setting of PYTHONPATH and echo $PYTHONPATH 2) echo $PATH so we can see what you're accessing 3) run appcfg.py by itself with no args post your results here. just a minor note that although using 2.6 is fine in dev, be sure not to use 2.6-specific features, because the live runtime uses 2.5.2, as stated in the docs here: http://code.google.com/appengine/docs/python/runtime.html#Pure_Python what i hope to see is the usage for appcfg.py and not the import error. crossing fingers! -wesley On Mon, Dec 28, 2009 at 12:03 PM, Peter Behr psb...@gmail.com wrote: Hi Wesley, thanks for the reply. can you doublecheck that directory to ensure that it's still there? unfortunately, i only have 2.5 on my machine so i can't confirm whether it works (or doesn't) in 2.6. Yup, it's all there: /usr/local/google_appengine/google/appengine/cron $ ls total 280 drwxr-xr-x 12 admin admin 408 Dec 27 23:02 . drwxr-xr-x 12 admin admin 408 Dec 27 23:02 .. -r-xr-xr-x@ 1 admin admin 27794 Dec 14 15:22 GrocLexer.py -r-xr-xr-x 1 admin admin 26294 Dec 27 23:02 GrocLexer.pyc -r-xr-xr-x@ 1 admin admin 24143 Dec 14 15:22 GrocParser.py -r-xr-xr-x 1 admin admin 20040 Dec 27 23:02 GrocParser.pyc -r-xr-x--- 1 admin admin 646 Dec 14 15:22 __init__.py -r-xr-x--- 1 admin admin 313 Dec 27 23:02 __init__.pyc -r-xr-x--- 1 admin admin 1909 Dec 14 15:22 groc.py -r-xr-x--- 1 admin admin 3050 Dec 27 23:02 groc.pyc -r-xr-xr-x@ 1 admin admin 9673 Dec 14 15:22 groctimespecification.py -r-xr-xr-x 1 admin admin 12133 Dec 27 23:02 groctimespecification.pyc One thing I suspect now is that in trying to wipe out my old install and redo it, I did only a partial job. But I'm still kind of stumped. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Core Python Programming, Prentice Hall, (c)2007,2001 Python Fundamentals, Prentice Hall, (c)2009 http://corepython.com wesley.j.chun :: wesc+...@google.com developer relations :: google app engine -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: groc module
Well, here's the result. ~ $ echo $PYTHONPATH ~ $ echo $PATH /Library/Frameworks/Python.framework/Versions/3.1/bin:/usr/bin:/bin:/ usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/texbin:/usr/X11/ bin ~ $ appcfg.py /usr/local/bin/appcfg.py:41: DeprecationWarning: the sha module is deprecated; use the hashlib module instead os.path.join(DIR_PATH, 'lib', 'antlr3'), Traceback (most recent call last): File /usr/local/bin/appcfg.py, line 67, in module run_file(__file__, globals()) File /usr/local/bin/appcfg.py, line 63, in run_file execfile(script_path, globals_) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/ GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/ google/appengine/tools/appcfg.py, line 50, in module from google.appengine.cron import groctimespecification File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/ GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/ google/appengine/cron/groctimespecification.py, line 43, in module import groc ImportError: No module named groc -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: groc module
And my default version of python is still 2.6, despite the 3.1 in the path, but perhaps that might be a problem. However, I've run GAE successfully before with 3.1 installed. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: groc module
hmmm, i'm kind of at a loss on this one. i am a little bit suspicious at the Python 3.1 though, esp. since it shows up at the beginning of your path. what happens when you type env python into your shell? also, what shows up when you do which python? does anyone else out there in the cloud use 2.6 on the mac that may be able to help? On Mon, Dec 28, 2009 at 1:14 PM, Peter Behr psb...@gmail.com wrote: And my default version of python is still 2.6, despite the 3.1 in the path, but perhaps that might be a problem. However, I've run GAE successfully before with 3.1 installed. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Core Python Programming, Prentice Hall, (c)2007,2001 Python Fundamentals, Prentice Hall, (c)2009 http://corepython.com wesley.j.chun :: wesc+...@google.com developer relations :: google app engine -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: groc module
Hey Peter, I am running OSX 10.6.2 + Python 2.6 too. No issues here. Like Wesley I am curious about 3.1 being in your path. My path looks like: ~$ echo $PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin Have you tried to run: ~$ python --version Python 2.6.1 Maybe you could try editing appcfg.py and changing the first from: #!/usr/bin/env python to: #!/usr/bin/env python2.6 Robert On Mon, Dec 28, 2009 at 6:17 PM, Wesley Chun wesc+...@google.com wrote: hmmm, i'm kind of at a loss on this one. i am a little bit suspicious at the Python 3.1 though, esp. since it shows up at the beginning of your path. what happens when you type env python into your shell? also, what shows up when you do which python? does anyone else out there in the cloud use 2.6 on the mac that may be able to help? On Mon, Dec 28, 2009 at 1:14 PM, Peter Behr psb...@gmail.com wrote: And my default version of python is still 2.6, despite the 3.1 in the path, but perhaps that might be a problem. However, I've run GAE successfully before with 3.1 installed. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Core Python Programming, Prentice Hall, (c)2007,2001 Python Fundamentals, Prentice Hall, (c)2009 http://corepython.com wesley.j.chun :: wesc+...@google.com developer relations :: google app engine -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: groc module
Well, it looks like the darndest thing. First off, here's the path from within Python (and it has remained unchanged through all of the events below). Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type help, copyright, credits or license for more information. import sys sys.path ['', '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/ python26.zip', '/System/Library/Frameworks/Python.framework/Versions/ 2.6/lib/python2.6', '/System/Library/Frameworks/Python.framework/ Versions/2.6/lib/python2.6/plat-darwin', '/System/Library/Frameworks/ Python.framework/Versions/2.6/lib/python2.6/plat-mac', '/System/ Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat- mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/ Versions/2.6/Extras/lib/python', '/System/Library/Frameworks/ Python.framework/Versions/2.6/lib/python2.6/lib-tk', '/System/Library/ Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-old', '/ System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ lib-dynload', '/Library/Python/2.6/site-packages', '/System/Library/ Frameworks/Python.framework/Versions/2.6/Extras/lib/python/PyObjC', '/ System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/ python/wx-2.8-mac-unicode'] I removed the Python 3.1 reference but that changed nothing. But I found that in my admin account (in which I had installed the Launcher in the first place) running appcfg.py did produce the desired result. Truly bizarre that in my regular user account, groctimespecification couldn't find the module groc, even though they're both in the same directory, and the first one was found no problem in the first place. Anyway, what I did was, without wiping anything out except / Applications/GoogleAppEngineLauncher.app, I took the SDK image in my regular user account, copied the Launcher to my desktop, opened it and made (revised?) symlinks, and suddenly everything works fine here. I have no idea why, because as far as I know the symlinks in /usr/local/ google_appengine/ are the same as before. One problem I can point out is that the README refers to a .pkg installer, but there is none. Was that the state of affairs previously? Anyway, this problem has taken up a lot of my time today so I have to move on, but if you guys have any commentary or want to try to reproduce it, I will be following up. Thank you so much for your prompt comments! -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: groc module
peter, i have no doubts that your Python 2.6 is working via the cmd-line. i'm just not convinced that your App Engine code is executing that same version. robert will know this as well, but it is a well-known problem users installing/upgrading Python on a Mac. it's even hard to Google for, but here is an old link: http://wiki.answers.com/Q/How_do_you_uninstall_python_in_mac_os_x_tiger the main issue that people run into when installing/upgrading is that they cannot fully remove the Python that Apple has installed. import problems are a primary symptom of not only upgrading or (re)installing, but also having multiple versions of Python installed. i cannot help but conclude that this is the main cause, esp. seeing your environment, but there's no easy way that i know of to clean it out. at this point, i would bite the bullet, back up the original groctimespecification.py file, then modify it so that somehow either logs or outputs to the screen the path as *it* knows it (before importing groc of course), e.g., dump sys.path as you did earlier, but directly from groctimespecification, and also sys.modules just to confirm what's been loaded so far. please let us know if you're somehow able to do this, or repair the various Python installations you have on your machine. best of luck! -wesley On Mon, Dec 28, 2009 at 6:23 PM, Peter Behr psb...@gmail.com wrote: Well, it looks like the darndest thing. First off, here's the path from within Python (and it has remained unchanged through all of the events below). Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type help, copyright, credits or license for more information. import sys sys.path ['', '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/ python26.zip', '/System/Library/Frameworks/Python.framework/Versions/ 2.6/lib/python2.6', '/System/Library/Frameworks/Python.framework/ Versions/2.6/lib/python2.6/plat-darwin', '/System/Library/Frameworks/ Python.framework/Versions/2.6/lib/python2.6/plat-mac', '/System/ Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat- mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/ Versions/2.6/Extras/lib/python', '/System/Library/Frameworks/ Python.framework/Versions/2.6/lib/python2.6/lib-tk', '/System/Library/ Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-old', '/ System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ lib-dynload', '/Library/Python/2.6/site-packages', '/System/Library/ Frameworks/Python.framework/Versions/2.6/Extras/lib/python/PyObjC', '/ System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/ python/wx-2.8-mac-unicode'] I removed the Python 3.1 reference but that changed nothing. But I found that in my admin account (in which I had installed the Launcher in the first place) running appcfg.py did produce the desired result. Truly bizarre that in my regular user account, groctimespecification couldn't find the module groc, even though they're both in the same directory, and the first one was found no problem in the first place. Anyway, what I did was, without wiping anything out except / Applications/GoogleAppEngineLauncher.app, I took the SDK image in my regular user account, copied the Launcher to my desktop, opened it and made (revised?) symlinks, and suddenly everything works fine here. I have no idea why, because as far as I know the symlinks in /usr/local/ google_appengine/ are the same as before. One problem I can point out is that the README refers to a .pkg installer, but there is none. Was that the state of affairs previously? Anyway, this problem has taken up a lot of my time today so I have to move on, but if you guys have any commentary or want to try to reproduce it, I will be following up. Thank you so much for your prompt comments! -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Core Python Programming, Prentice Hall, (c)2007,2001 Python Fundamentals, Prentice Hall, (c)2009 http://corepython.com wesley.j.chun :: wesc+...@google.com developer relations :: google app engine -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.