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
I can import zerorpc, and confirm Server class was in zerorpc.core module. but the interpreter always report "AttributeError: 'module' object has no attribute 'Server'"
Test platform:
windows 10,python 2.7.15
Traceback (most recent call last):
File "e:/Tool_development/python_resource/py27virenv/testAutomation/zerorpcproject/zerorpc.py", line 7, in
import zerorpc
File "e:\Tool_development\python_resource\py27virenv\testAutomation\zerorpcproject\zerorpc.py", line 8, in
s = zerorpc. Server()
AttributeError: 'module' object has no attribute 'Server'
Test Script:
class HelloRPC(object):
def hello(self, name):
return "Hello, %s" % name
import zerorpc
test = zerorpc.Server(HelloRPC())
s = zerorpc.Server()
s.bind("tcp://0.0.0.0:4242")
s.run()
pip list:
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Package Version
Are you on MS Windows as well? If you follow the path to the zerorpc module
do you find all the files?
Can you add here the full error. Just in case something obvious comes up.
Try importing other symbols from zerorpc to find out by elimination what is
happening.
I can import zerorpc, and confirm Server class was in zerorpc.core module. but the interpreter always report "AttributeError: 'module' object has no attribute 'Server'"
windows 10,python 2.7.15
Traceback (most recent call last):
File "e:/Tool_development/python_resource/py27virenv/testAutomation/zerorpcproject/zerorpc.py", line 7, in
import zerorpc
File "e:\Tool_development\python_resource\py27virenv\testAutomation\zerorpcproject\zerorpc.py", line 8, in
s = zerorpc. Server()
AttributeError: 'module' object has no attribute 'Server'
class HelloRPC(object):
def hello(self, name):
return "Hello, %s" % name
import zerorpc
test = zerorpc.Server(HelloRPC())
s = zerorpc.Server()
s.bind("tcp://0.0.0.0:4242")
s.run()
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Package Version
cffi 1.12.3
future 0.17.1
gevent 1.4.0
greenlet 0.4.15
msgpack 0.6.1
pip 19.1.1
pycparser 2.19
pyzmq 18.0.2
setuptools 41.0.1
wheel 0.33.4
zerorpc 0.6.3
The text was updated successfully, but these errors were encountered: