wuguobao / pybeanstalk

Automatically exported from code.google.com/p/pybeanstalk
0 stars 0 forks source link

Python2.6: 'TimeOut' is not defined #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
[root@development ~]# python2.6 test.py
Traceback (most recent call last):
  File "test.py", line 3, in <module>
    from beanstalk import serverconn
  File "/usr/local/lib/python2.6/site-packages/beanstalk/__init__.py", line
1, in <module>
    import serverconn
  File "/usr/local/lib/python2.6/site-packages/beanstalk/serverconn.py",
line 2, in <module>
    import protohandler
  File "/usr/local/lib/python2.6/site-packages/beanstalk/protohandler.py",
line 236, in <module>
    @interaction(OK('RESERVED', ['jid','bytes'], True), TimeOut('TIMED_OUT'))
NameError: name 'TimeOut' is not defined

What version of the product are you using? On what operating system?
git head of pybeanstalkd (also pybeanstalkd 0.11.1), python2.6, CentOS5.2

Original issue reported on code.google.com by phillip....@gmail.com on 9 Feb 2009 at 9:59

GoogleCodeExporter commented 9 years ago
Pushed a fix to git head. This should fix it, but I will leave this ticket open 
for a
while. If its still broken, please comment here.

Original comment by sophac...@gmail.com on 9 Feb 2009 at 2:20

GoogleCodeExporter commented 9 years ago
Fixed that issue, but another has raised:

[root@development ~]# python2.6 test.py
Traceback (most recent call last):
  File "test.py", line 3, in <module>
    from beanstalk import serverconn
  File "/usr/local/lib/python2.6/site-packages/beanstalk/__init__.py", line 5, in
<module>
    import twisted_client
  File "/usr/local/lib/python2.6/site-packages/beanstalk/twisted_client.py", line 1,
in <module>
    from twisted.protocols import basic
ImportError: No module named twisted.protocols

Its a fresh python2.6 build; few additional modules and twisted hasn'tbeen 
installed
(and probably won't be unless required) 

Original comment by phillip....@gmail.com on 9 Feb 2009 at 3:06

GoogleCodeExporter commented 9 years ago
This is a good point. I set up a conditional import, much like I did with the 
libevent client, and pushed it to git 
head.

Original comment by sophac...@gmail.com on 9 Feb 2009 at 3:31

GoogleCodeExporter commented 9 years ago
All seems to be running fine now. Thanks for the speedy fixes!

Original comment by phillip....@gmail.com on 9 Feb 2009 at 3:35

GoogleCodeExporter commented 9 years ago
Awesome, Im going to mark this issue as fixed.   Thanks for the bug reports.  
If you find any others please let me 
know!  Also: if you have any suggestions for improvement, I always like to hear 
about them too.

Original comment by sophac...@gmail.com on 9 Feb 2009 at 3:45