uwescience / myria-web

Web frontend for Myria
https://demo.myria.cs.washington.edu
Other
11 stars 14 forks source link

Cannot import 'requests.packages.urllib3' #249

Closed jmschrei closed 9 years ago

jmschrei commented 9 years ago

This is a very odd bug for me, so I figured I'd post it here.

When I run "python google_appengine/dev_appserver.py /home/jmschr/Desktop/myria-web/appengine", I get "ImportError("No module named 'requests.packages.urllib3'). The error comes from myria-web/appengine/requests/packages/init.py. If I go a Python terminal, I can import requests, requests.packages.urllib3, and urllib3 independently. However when I run this program through the appengine python program it seems to forget I have them.

I renamed the requests file seeing as I had requests already installed, and that didn't seem to help (it now couldn't find requests). I also try directly importing urllib3 into the namespace in packages/init.py, but it doesn't know what urllib3 is (even though it works for me in a python terminal).

Any suggestions?

dhalperi commented 9 years ago

Can you try the app engine launcher and see if the bug still occurs?


Daniel Halperin Director of Research for Scalable Data Analytics eScience Institute University of Washington

On Wed, Feb 11, 2015 at 4:32 PM, Jacob Schreiber notifications@github.com wrote:

This is a very odd bug for me, so I figured I'd post it here.

When I run "python google_appengine/dev_appserver.py /home/jmschr/Desktop/myria-web/appengine", I get "ImportError("No module named 'requests.packages.urllib3'. The error comes from myria-web/appengine/requests/packages/init.py. If I go a Python terminal, I can import requests, requests.packages.urllib3, and urllib3 independently. However when I run this program through the appengine python program it seems to forget I have them.

I renamed the requests file seeing as I had requests already installed, and that didn't seem to help (it now couldn't find requests). I also try directly importing urllib3 into the namespace in packages/init.py, but it doesn't know what urllib3 is (even though it works for me in a python terminal).

Any suggestions?

— Reply to this email directly or view it on GitHub https://github.com/uwescience/myria-web/issues/249.

jmschrei commented 9 years ago

I can't find the app engine launcher, can you point me in the right direction?

billhowe commented 9 years ago

https://www.google.com/search?q=app+engine+launcher

On Wed, Feb 11, 2015 at 4:52 PM, Jacob Schreiber notifications@github.com wrote:

I can't find the app engine launcher, can you point me in the right direction?

— Reply to this email directly or view it on GitHub https://github.com/uwescience/myria-web/issues/249#issuecomment-73997507 .

Bill Howe Associate Director and Senior Data Science Fellow, UW eScience Institute Affiliate Faculty, Computer Science & Engineering University of Washington To acknowledge eScience: "Supported in part by the University of Washington eScience Institute"

jmschrei commented 9 years ago

Thanks Bill. I have that, and was using the dev_appserver.py script in it. Is there another script I should be using?

dhalperi commented 9 years ago

I guess the instructions aren't that helpful. Here's my experience on Mac:

  1. from this link: https://cloud.google.com/appengine/downloads, I see this: screen shot 2015-02-11 at 5 28 29 pm
  2. As part of downloading and installing that, it sets up an application shortcut screen shot 2015-02-11 at 5 29 17 pm

So the instructions are "obvious" to us... I'm guessing that maybe you're using a different platform?

jmschrei commented 9 years ago

I'm on Ubuntu and the app does not come natively with Google AppEngine.

I followed this thread to try to get it: http://askubuntu.com/questions/308534/google-app-engine-gui-launcher-for-ubuntu-13-04

I downloaded wxglade and wxversion as suggested, then checked out the repo using subversion as they suggested, giving me the google-appengine-launcher folder with GoogleAppEngineLauncher.py in it.

However, whenever I try to run GoogleAppEngineLauncher.py I get "wxPython is not available", even after using sudo apt-get install python-wxversion python-wxglade as was suggested.

dhalperi commented 9 years ago

Hmm. This isn't really something we can help debug, as none of us develop on Linux.

<overly honest> I'm inclined to say "those who make themselves use awful tools [Desktop Linux] deserve to suffer the consequences"... but that's probably not helpful. </overly honest>

If one of us finds time, maybe someone in the @uwescience/myria team can find a way to get Desktop Linux up and running and debug the process of launching the development server. Unfortunately, I'm not sure it's going to be a top priority.

dhalperi commented 9 years ago

(I did send an email asking the group to check out this issue.)

jmschrei commented 9 years ago

I find your overly honest statement a bit ironic given that you don't have documentation for how to install and use Myria on a desktop system with a freely available iso.

dhalperi commented 9 years ago

I'm not going to dignify the laughable implication that that you didn't "opt-in" to Ubuntu... no need to feed the trolls.

I don't have access to Ubuntu desktop, but I did just go through the extraordinarily simple and fully documented myria-web setup steps (I skipped step 2, as it's not mandatory) on our Ubuntu server, and everything worked fine:

mkdir /disk1/sandbox
cd /disk1/sandbox
git clone https://github.com/uwescience/myria-web
wget https://storage.googleapis.com/appengine-sdks/featured/google_appengine_1.9.17.zip
unzip google_appengine_1.9.17.zip
cd myria-web
git submodule init
git submodule update
../google_appengine/dev_appserver.py --port=12345 appengine

and in a new window

curl -i localhost:12345

and it worked:

HTTP/1.1 301 Moved Permanently
location: http://localhost:12345/editor
cache-control: no-cache
content-type: text/html; charset=utf-8
Content-Length: 0
Server: Development/2.0
Date: Fri, 13 Feb 2015 02:13:19 GMT

Of course, you may not need to set the appengine port if your machine is not using the default port; our server is.

Seems like you have a personal problem.

dhalperi commented 9 years ago

Note that you should not need to install any packages in the Python system -- App Engine does not use them. The packages it uses are all included in the app engine kit or in the myria-web submodules.

jmschrei commented 9 years ago

That summary was excellent, it seems to have fixed whatever issue I was having. I would suggest putting that in the myria-web README you linked to (most of the commands are already there, but I've always found simple succinct list of commands to be the most informative). However, while it is working, I get repeatedly

INFO    2015-02-13 21:14:58,366 module.py:718] default: "POST {command} HTTP/1.1" 400 61 
Unable to create 'parsetab.py'
[Errno 30] Read-only file system: 'parsetab.py'

where command in {/optimize, /dot, /compile, /plan}, ending with

WARNING    2015-02-13 21:15:00,535 myrialang.py:1238] Error converting Store(public:adhoc:JustX)[Apply(x=$0)[Scan(public:adhoc:TwitterK)]]: convert <class 'raco.algebra.Store'> to sql
INFO    2015-02-13 21:15:00,541 module.py:718] default "POST /compile HTTP/1.1" 200 978

These don't seem to prevent me from loading the frontend in a browser though. The browser has a warning saying that Myria will be reserved for research experiments soon; can I go ahead and ignore that since I'm running on a local machine?

dhalperi commented 9 years ago

That is the aforementioned step 2 on the install docs. It is not a correctness error, only a performance hit

— Sent from my phone

On Fri, Feb 13, 2015 at 1:21 PM, Jacob Schreiber notifications@github.com wrote:

That summary was excellent, it seems to have fixed whatever issue I was having. I would suggest putting that in the myria-web README you linked to. However, while it is working, I get repeatedly

INFO    2015-02-13 21:14:58,366 module.py:718] default: "POST {command} HTTP/1.1" 400 61 
Unable to create 'parsetab.py'
[Errno 30] Read-only file system: 'parsetab.py'

where command in {/optimize, /dot, /compile, /plan}, ending with

WARNING    2015-02-13 21:15:00,535 myrialang.py:1238] Error converting Store(public:adhoc:JustX)[Apply(x=$0)[Scan(public:adhoc:TwitterK)]]: convert <class 'raco.alphebra.Store'> to sql
INFO    2015-02-13 21:15:00,541 module.py:718] default "POST /compile HTTP/1.1" 200 978

These don't seem to prevent me from loading the frontend in a browser though. The browser has a warning saying that Myria will be reserved for research experiments soon; can I go ahead and ignore that since I'm running on a local machine?

Reply to this email directly or view it on GitHub: https://github.com/uwescience/myria-web/issues/249#issuecomment-74328903

jingjingwang commented 9 years ago

"can I go ahead and ignore that since I'm running on a local machine?" -- yes you're exactly right.

"[Errno 30] Read-only file system: 'parsetab.py'" -- hmm, read-only file system?

dhalperi commented 9 years ago

Read only because of the app engine sandbox

— Sent from my phone

On Fri, Feb 13, 2015 at 1:37 PM, jingjingwang notifications@github.com wrote:

"can I go ahead and ignore that since I'm running on a local machine?" -- yes you're exactly right.

"[Errno 30] Read-only file system: 'parsetab.py'" -- hmm, read-only file system?

Reply to this email directly or view it on GitHub: https://github.com/uwescience/myria-web/issues/249#issuecomment-74331246

jmschrei commented 9 years ago

I'm going to go ahead and close this issue then, since it's been resolved. Thank you!

dhalperi commented 9 years ago

Can you explain what step in there was not directly implied by the instructions in the install step? The clone and fixing submodules were explicit, the "run dev_appserver with path to appengine" just requires getting the path correct.

What were you doing differently?

jmschrei commented 9 years ago

I likely downloaded the incorrect google appengine and/or did not handle working with it correctly. Having a specific wget/unzip command was super useful to me, as I am not familiar with using it at all prior to this.