Comments (3)
Solved on the version 0.7.0, was an built in exception from py3
from signalrcore.
Are you sure this is solved? I used your latest version 0.7.0 and if I try to import the HubConnectionBuilder class as stated in the example, I still get the undefined 'ConnectionError'.
pip list (omitted full output):
C:\project\websocket>py -2 -m pip list
..
..
Package Version
----------------------------- ---------
..
..
signalrcore 0.7.0
..
..
REPL (python2):
C:\project\websocket>py -2
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>> from signalrcore.hub_connection_builder import HubConnectionBuilder
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\signalrcore\hub_connection_builder.py", line 4, in <module>
from .hub.auth_hub_connection import AuthHubConnection
File "C:\Python27\lib\site-packages\signalrcore\hub\auth_hub_connection.py", line 4, in <module>
from .errors import UnAuthorizedHubError, HubError
File "C:\Python27\lib\site-packages\signalrcore\hub\errors.py", line 1, in <module>
class HubError(ConnectionError):
NameError: name 'ConnectionError' is not defined
>>>
And it is not only this undefined exception. I also see that some internal modules uses other stuff from Python3, which are not available in Python2, like in the signalrcore.helpers
module this import:
from urllib import parse
Will lead to this error in Python2:
C:\Python27>py -2
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> from urllib import parse
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name parse
>>>
This parse
function is in Python2 available in urlparse
, so for Python2 this statement should be:
C:\Python27>py -2
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import urlparse as parse
>>>
So, there might be more stuff in the signalrcore, which is not Python2 compatible.
from signalrcore.
This was fixed on previous version (since 0.7.4). Thanks for reporting it !
from signalrcore.
Related Issues (20)
- on_reconnect event is not triggered
- on_error function is not called
- reconnect_interval does not seem to have any affect
- {TypeError}Object of type WebSocketService is not JSON serializable
- Custom client cert HOT 1
- Client results
- Problems on "hub_connection.send()" call directly after starting the connection HOT 1
- Unable to subscribe to events with multiple parameters
- async python support HOT 1
- Spelling error HOT 1
- Feature: Support .net allowReconnect type
- Problem with serialization
- A way to handle messages without event?
- send method use same uuid str eveytime. cause incorrect CompletionMessage. HOT 2
- Why does the library support sending bytes, but not accepting bytes? HOT 1
- The Readme is outdated
- http and https transport "invalid"
- Connecting to Azure SignalR managed service seems impossible. HOT 1
- Reconnect logic spamming logs and creating threads until resource exhaustion occurs
- invoke equivalend command in this library
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from signalrcore.