Anyone have experience with Web Services Made Easy?

41 views
Skip to first unread message

Eric Cozzi

unread,
Nov 15, 2013, 3:40:19 PM11/15/13
to pym...@googlegroups.com
Trying to run the WSME demo code, and am getting the following errors. Any help would be appreciated.

Thanks,
Eric

(wsme)erics-mbp:demo eric$ ~/Virtualenvs/wsme/bin/python setup.py develop
/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'package'
  warnings.warn(msg)
running develop
running egg_info
writing requirements to demo.egg-info/requires.txt
writing demo.egg-info/PKG-INFO
writing top-level names to demo.egg-info/top_level.txt
writing dependency_links to demo.egg-info/dependency_links.txt
reading manifest file 'demo.egg-info/SOURCES.txt'
writing manifest file 'demo.egg-info/SOURCES.txt'
running build_ext
Creating /Users/eric/Virtualenvs/wsme/lib/python2.7/site-packages/demo.egg-link (link to .)
Adding demo 0.0.0 to easy-install.pth file

Installed /Users/eric/Projects/wsme/wsme/examples/demo
Processing dependencies for demo==0.0.0
Searching for Pygments
Reading http://www.owlfish.com/software/wsgiutils/download.html
Reading https://pypi.python.org/simple/Pygments/
Best match: Pygments 1.6
Downloading https://pypi.python.org/packages/2.7/P/Pygments/Pygments-1.6-py2.7.egg#md5=1e1e52b1e434502682aab08938163034
Processing Pygments-1.6-py2.7.egg
creating /Users/eric/Virtualenvs/wsme/lib/python2.7/site-packages/Pygments-1.6-py2.7.egg
Extracting Pygments-1.6-py2.7.egg to /Users/eric/Virtualenvs/wsme/lib/python2.7/site-packages
Adding Pygments 1.6 to easy-install.pth file
Installing pygmentize script to /Users/eric/Virtualenvs/wsme/bin

Installed /Users/eric/Virtualenvs/wsme/lib/python2.7/site-packages/Pygments-1.6-py2.7.egg
Searching for Bottle
Reading https://pypi.python.org/simple/Bottle/
Best match: bottle 0.11.6
Downloading https://pypi.python.org/packages/source/b/bottle/bottle-0.11.6.tar.gz#md5=0bafdc4e13ea2b1a3bddf36b5af108c4
Processing bottle-0.11.6.tar.gz
Writing /var/folders/cm/v06kbnh15m1c9ffmw26kh_5w0000gn/T/easy_install-LKfhzN/bottle-0.11.6/setup.cfg
Running bottle-0.11.6/setup.py -q bdist_egg --dist-dir /var/folders/cm/v06kbnh15m1c9ffmw26kh_5w0000gn/T/easy_install-LKfhzN/bottle-0.11.6/egg-dist-tmp-JPzUHp
zip_safe flag not set; analyzing archive contents...
bottle: module references __file__
bottle: module references __path__
Adding bottle 0.11.6 to easy-install.pth file
Installing bottle.py script to /Users/eric/Virtualenvs/wsme/bin

Installed /Users/eric/Virtualenvs/wsme/lib/python2.7/site-packages/bottle-0.11.6-py2.7.egg
Searching for WSME==0.4
Best match: WSME 0.4
Adding WSME 0.4 to easy-install.pth file

Using /Users/eric/Virtualenvs/wsme/lib/python2.7/site-packages
Searching for WebOb==1.2.3
Best match: WebOb 1.2.3
Adding WebOb 1.2.3 to easy-install.pth file

Using /Users/eric/Virtualenvs/wsme/lib/python2.7/site-packages
Searching for simplegeneric==0.8.1
Best match: simplegeneric 0.8.1
Adding simplegeneric 0.8.1 to easy-install.pth file

Using /Users/eric/Virtualenvs/wsme/lib/python2.7/site-packages
Searching for six==1.4.1
Best match: six 1.4.1
Adding six 1.4.1 to easy-install.pth file

Using /Users/eric/Virtualenvs/wsme/lib/python2.7/site-packages
Finished processing dependencies for demo==0.0.0

(wsme)erics-mbp:demo eric$ ~/Virtualenvs/wsme/bin/python demo.py
Traceback (most recent call last):
  File "demo.py", line 14, in <module>
    from wsme import WSRoot, expose, validate
  File "/Users/eric/Virtualenvs/wsme/lib/python2.7/site-packages/wsme/__init__.py", line 2, in <module>
    from wsme.root import WSRoot
  File "/Users/eric/Virtualenvs/wsme/lib/python2.7/site-packages/wsme/root.py", line 14, in <module>
    from wsme import spore
  File "/Users/eric/Virtualenvs/wsme/lib/python2.7/site-packages/wsme/spore.py", line 1, in <module>
    from wsme import types
  File "/Users/eric/Virtualenvs/wsme/lib/python2.7/site-packages/wsme/types.py", line 520, in <module>
    class Base(six.with_metaclass(BaseMeta)):
  File "/Users/eric/Virtualenvs/wsme/lib/python2.7/site-packages/six.py", line 566, in with_metaclass
    return meta("NewBase", bases, {})
  File "/Users/eric/Virtualenvs/wsme/lib/python2.7/site-packages/wsme/types.py", line 511, in __new__
    if bases[0] is not object and '__registry__' not in dct:
IndexError: tuple index out of range

Peter J. Farrell

unread,
Nov 15, 2013, 4:28:28 PM11/15/13
to pym...@googlegroups.com
Looks like you might be using easy_install.  I'd suggest using PIP instead... easy install has been deprecated.  Looks like you are using a Mac (I see mbp in your user name).  Check out this for PIP installation instructions:

https://github.com/mxcl/homebrew/wiki/Gems,-Eggs-and-Perl-Modules

After you install pip, I all you have to do is run:

pip install WSME

Be sure you are in your virtual env otherwise you need to use sudo with pip if you are going to install packages system wide.

BTW, I just tried to install via PIP and everything -- it failed on my machine via easy_install


Eric Cozzi said the following on 11/15/2013 02:40 PM:
--
Meetings Schedule / RVSP on our Meetup at http://python.mn
---
You received this message because you are subscribed to the Google Groups "PyMNtos" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pymntos+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


-- 
Peter J. Farrell
Principal Technologist - Maestro Publishing, LLC
http://blog.maestropublishing.com
Identi.ca / Twitter: @maestrofjp

* Learn about VSRE. I prioritize emails with VSRE in the subject!  http://vsre.info/
* Please do not send me Microsoft Office/Apple iWork documents. Send OpenDocument instead! http://fsf.org/campaigns/opendocument/

Randy Kleinman

unread,
Nov 15, 2013, 4:39:23 PM11/15/13
to pym...@googlegroups.com
Peter, I am not sure if your pip install failed or not based on your response. Incidentally, installing using pip with python 2.7.5 works for me, but importing the module gives me the same error afterwards. So I don't think this is an installation problem.

(wsme-demo)(Python 2.7.5) (rkleinman@mbp-rkleinman) - (Fri Nov 15 - 15:35:32) (~)
>> python
Python 2.7.5 (default, Nov  5 2013, 10:38:30)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import wsme
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/rkleinman/virtualenvs/wsme-demo/lib/python2.7/site-packages/wsme/__init__.py", line 2, in <module>
    from wsme.root import WSRoot
  File "/Users/rkleinman/virtualenvs/wsme-demo/lib/python2.7/site-packages/wsme/root.py", line 14, in <module>
    from wsme import spore
  File "/Users/rkleinman/virtualenvs/wsme-demo/lib/python2.7/site-packages/wsme/spore.py", line 1, in <module>
    from wsme import types
  File "/Users/rkleinman/virtualenvs/wsme-demo/lib/python2.7/site-packages/wsme/types.py", line 520, in <module>
    class Base(six.with_metaclass(BaseMeta)):
  File "/Users/rkleinman/virtualenvs/wsme-demo/lib/python2.7/site-packages/six.py", line 566, in with_metaclass
    return meta("NewBase", bases, {})
  File "/Users/rkleinman/virtualenvs/wsme-demo/lib/python2.7/site-packages/wsme/types.py", line 511, in __new__
    if bases[0] is not object and '__registry__' not in dct:
IndexError: tuple index out of range
>>> exit()
(wsme-demo)(Python 2.7.5) (rkleinman@mbp-rkleinman) - (Fri Nov 15 - 15:36:04) (~)
>> pip freeze
WSME==0.4
WebOb==1.2.3
simplegeneric==0.8.1
six==1.4.1
wsgiref==0.1.2

Eric Cozzi

unread,
Nov 15, 2013, 4:46:34 PM11/15/13
to pymntos
Peter,

I do have pip installed and used it to install WSME from within my Virtualenv. I am also on a Mac. :) Good eye there. Hmmm... what else?

Eric


On Fri, Nov 15, 2013 at 3:28 PM, Peter J. Farrell <p...@maestropublishing.com> wrote:

Peter J. Farrell

unread,
Nov 15, 2013, 4:50:18 PM11/15/13
to pym...@googlegroups.com
Randy Kleinman said the following on 11/15/2013 03:39 PM:
> Peter, I am not sure if your pip install failed or not based on your
> response.
It installed via pip OK for me...

> Incidentally, installing using pip with python 2.7.5 works for me, but
> importing the module gives me the same error afterwards.
I can import it just fine:

(wsme-demo)peter@Blizzardme:~/apps/GPUTest$ python
Python 2.7.5+ (default, Sep 19 2013, 13:48:49)
[GCC 4.8.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import wsme
>>>

> So I don't think this is an installation problem.
> >> pip freeze
> WSME==0.4
> WebOb==1.2.3
> simplegeneric==0.8.1
> six==1.4.1
> wsgiref==0.1.2
>
Hmmm... PIP installs 0.5b6 and you have 0.4

(wsme-demo)peter@Blizzardme:~/apps/GPUTest$ pip freeze
WSME==0.5b6
WebOb==1.2.3
argparse==1.2.1
simplegeneric==0.8.1
six==1.4.1
wsgiref==0.1.2

http://pythonhosted.org/WSME/changes.html

Looking at the CHANGELOG... 0.4 is over a year old at this point. 0.5b6
came out last month (October).

Maybe try the latest version...???

Peter J. Farrell

unread,
Nov 15, 2013, 4:52:46 PM11/15/13
to pym...@googlegroups.com
Eric Cozzi said the following on 11/15/2013 03:46 PM:
> Peter,
>
> I do have pip installed and used it to install WSME from within my
> Virtualenv. I am also on a Mac. :) Good eye there. Hmmm... what else?
What does pip freeze dump out? I'm wondering if you have the latest
version of wsme.

Can you import wsme in a python console or does that fail like Randy
Kleinman indicated in his test?

Also, I assume you're using Python 2.7.5 (based on some the file
paths...I could be wrong).

Randy Kleinman

unread,
Nov 15, 2013, 4:54:26 PM11/15/13
to pym...@googlegroups.com
For some reason pip installed 0.4 for me. I uninstalled and reinstalled with just "pip install WSME" and it gave me 0.4 again.

If I explicitly install with "pip install WSME==0.5b6" then it installs and imports fine.

Confused. :)


Eric Cozzi

unread,
Nov 15, 2013, 4:56:28 PM11/15/13
to pym...@googlegroups.com
Randy, I owe you a drink.

:)

Peter J. Farrell

unread,
Nov 15, 2013, 4:59:13 PM11/15/13
to pym...@googlegroups.com
Randy Kleinman said the following on 11/15/2013 03:54 PM:
> For some reason pip installed 0.4 for me. I uninstalled and
> reinstalled with just "pip install WSME" and it gave me 0.4 again.
>
> If I explicitly install with "pip install WSME==0.5b6" then it
> installs and imports fine.
>
You must have installed WSME in a prior life. Pip caches packages that
were previously installed:

http://stackoverflow.com/questions/9510474/removing-pips-cache

I recommending using pip-tools so you can review installed packages and
if there are newer version. Like pip freeze but on steroids...

Peter J. Farrell

unread,
Nov 15, 2013, 5:00:21 PM11/15/13
to pym...@googlegroups.com
Eric Cozzi said the following on 11/15/2013 03:56 PM:
> Randy, I owe you a drink.
>
> :)
>
Ah, I see I get the short end of the stick here ;-)

P.s. Tongue in cheek here for those that don't know my humor....

Randy Kleinman

unread,
Nov 15, 2013, 5:01:39 PM11/15/13
to pym...@googlegroups.com
pip-tools, awesome! Wow, how have I not heard of that before this?


Eric Cozzi

unread,
Nov 15, 2013, 5:01:11 PM11/15/13
to pym...@googlegroups.com
Oh, all right... I'll throw you a few pretzels!

Eric


Peter J. Farrell

unread,
Nov 15, 2013, 5:03:57 PM11/15/13
to pym...@googlegroups.com
Eric Cozzi said the following on 11/15/2013 04:01 PM:
> Oh, all right... I'll throw you a few pretzels!
Ha ha, I knew you were trying to kill me... ;-)

<--- Celiac... pretzels = death my gluten

Peter J. Farrell

unread,
Nov 15, 2013, 5:05:35 PM11/15/13
to pym...@googlegroups.com
Randy Kleinman said the following on 11/15/2013 04:01 PM:
> pip-tools, awesome! Wow, how have I not heard of that before this?
I talked about this at a meeting earlier this year when I did a
whirlwind preso on virtualenv and pip with all the cool tools
surrounding it. Then Ian Bicking (the creator of VirtualEnv) showed up
at Indeed Brewing after the meeting... glad he didn't show to the
meeting itself...

.pjf

Peter J. Farrell

unread,
Nov 15, 2013, 6:08:35 PM11/15/13
to pym...@googlegroups.com
I can dig out my notes and write them up for my blog if you want...

Randy Kleinman

unread,
Nov 15, 2013, 10:13:18 PM11/15/13
to pym...@googlegroups.com
Peter - writing it up would be great if you have the time.

P.S. My wife makes some killer (in a good way) gluten-free chocolate chip cookies. Maybe a good non-gluten treat for the next pymntos meeting?


Reply all
Reply to author
Forward
0 new messages