pypge icon indicating copy to clipboard operation
pypge copied to clipboard

import error in pypge.search

Open arendsee opened this issue 8 years ago • 4 comments

The import below

from pypge.search import PGE

outputs the following error message

** (pge-test.py:5235): WARNING **: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Traceback (most recent call last):
  File "./pge-test.py", line 2, in <module>
    from pypge.search import PGE
  File "/usr/lib/python3.5/site-packages/pypge/search.py", line 25, in <module>
    from websocket import create_connection
ImportError: cannot import name 'create_connection'

I believe the problem is that search.py is attempting to use a package that does not exist in python3.

Replacing

from websocket import create_connection

with

from websockets import connect

and replacing create_connection everywhere in search.py with connect, might fix the problem (I haven't looked into it very carefully yet).

arendsee avatar Mar 31 '16 23:03 arendsee

I have the same problem. I fixed it temporarily by commenting out the code that uses create_connection. Please fix!

embg avatar Jun 07 '16 22:06 embg

My experience is that a pip install websocket-client fixes this particular issue

ianhbell avatar Jun 08 '16 00:06 ianhbell

Probably a missing line in requirements.txt

On Tue, Jun 7, 2016, 6:06 PM Ian Bell [email protected] wrote:

My experience is that a pip install websocket-client fixes this particular issue

— You are receiving this because you are subscribed to this thread.

Reply to this email directly, view it on GitHub https://github.com/verdverm/pypge/issues/3#issuecomment-224450869, or mute the thread https://github.com/notifications/unsubscribe/ABU4CPlKJO1ytRQfCQz5I-rV-q5yaRasks5qJgeggaJpZM4H9QU4 .

verdverm avatar Jun 08 '16 00:06 verdverm

New instructions for running in the README.md

Let me know how this works out

verdverm avatar Jun 11 '16 18:06 verdverm