You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey guys! I'm using ppft 1.6.6.1 on Python 2.7.12 linux and it's causing me this problem:
2020-06-05 09:57:07,496 INFO [pp][DummyThread-12] Running on Python 2.7.12 linux2
[2020-06-05 09:57:07 +0000] [11841] [ERROR] Error handling request /test_request
Traceback (most recent call last):
File "/home/an_env/local/lib/python2.7/site-packages/gunicorn/workers/async.py", line 56, in handle
self.handle_request(listener_name, req, client, addr)
...
...
...
File "/home/an_workspace/ref-diffs/ref_diffs/helpers.py", line 26, in async_requests
JOB_SERVER = pp.Server(ppservers=())
File "/home/an_env/local/lib/python2.7/site-packages/ppft/_pp.py", line 358, in __init__
self.set_ncpus(ncpus)
File "/home/an_env/local/lib/python2.7/site-packages/ppft/_pp.py", line 522, in set_ncpus
range(ncpus - len(self.__workers))])
File "/home/an_env/local/lib/python2.7/site-packages/ppft/_pp.py", line 155, in __init__
self.start()
File "/home/an_env/local/lib/python2.7/site-packages/ppft/_pp.py", line 162, in start
self.t = pptransport.CPipeTransport(proc.stdout, proc.stdin)
File "/home/an_env/local/lib/python2.7/site-packages/ppft/transport.py", line 128, in __init__
raise TypeError("Both arguments of PipeTransport constructor " \
TypeError: Both arguments of PipeTransport constructor must be file objects
Checking around, I discovered the cause. The classes used in gevent for file readers and writers aren't properly detected as file objects. Yet, they are. So the error in transport.py is a bug.
I'm using version 1.6.6.1 installed from pip and noticed that the current code solves the issue.
Is there any deployment to pip of a newer version scheduled?
If so, it's going to save a considerable amount of work on automation scripts.
Anyway, thanks a lot for the project.
It saved us big time to be able to use async in python2 ;)
PS: we are little by little migrating to py3, but it takes lots of time and $$ we don't have right now
The text was updated successfully, but these errors were encountered:
Nah! Getting the most recent dev version from git didn't solve the issue.
The check using file fails as well. So, I forked and make a fix using a weak duck typing. Just checking if there is the read and write attributes.
I think the best way of solving this is creating a function to check using types in python3 or duck typing in python2. Or, we could remove that check from PipeTransport and get rid of the problem - and let an error happen in case no file interface is provided ;)
Hey guys! I'm using ppft 1.6.6.1 on Python 2.7.12 linux and it's causing me this problem:
Checking around, I discovered the cause. The classes used in gevent for file readers and writers aren't properly detected as file objects. Yet, they are. So the error in transport.py is a bug.
I'm using version 1.6.6.1 installed from pip and noticed that the current code solves the issue.
Is there any deployment to pip of a newer version scheduled?
If so, it's going to save a considerable amount of work on automation scripts.
Anyway, thanks a lot for the project.
It saved us big time to be able to use async in python2 ;)
PS: we are little by little migrating to py3, but it takes lots of time and $$ we don't have right now
The text was updated successfully, but these errors were encountered: