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
2 controllers
server: ev3devfrontright
client: ev3devbackleft
server starts.
when the client knocks on the server, it joins and immediately disconnects with an error:
Traceback (most recent call last):
File "/home/robot/blrpyc/main.py", line 55, in
conn = rpyc.classic.connect('192.168.0.2')
File "/usr/lib/python3/dist-packages/rpyc/utils/classic.py", line 68, in connect
return factory.connect(host, port, SlaveService, ipv6 = ipv6, keepalive = keepalive)
File "/usr/lib/python3/dist-packages/rpyc/utils/factory.py", line 90, in connect
return connect_stream(s, service, config)
File "/usr/lib/python3/dist-packages/rpyc/utils/factory.py", line 51, in connect_stream
return connect_channel(Channel(stream), service = service, config = config)
File "/usr/lib/python3/dist-packages/rpyc/utils/factory.py", line 40, in connect_channel
return Connection(service, channel, config = config)
File "/usr/lib/python3/dist-packages/rpyc/core/protocol.py", line 151, in init
self._init_service()
File "/usr/lib/python3/dist-packages/rpyc/core/protocol.py", line 154, in _init_service
self._local_root.on_connect()
File "/usr/lib/python3/dist-packages/rpyc/core/service.py", line 146, in on_connect
self._conn.eval = self._conn.root.eval
File "/usr/lib/python3/dist-packages/rpyc/core/netref.py", line 150, in getattr
return syncreq(self, consts.HANDLE_GETATTR, name)
File "/usr/lib/python3/dist-packages/rpyc/core/netref.py", line 71, in syncreq
return conn.sync_request(handler, oid, *args)
File "/usr/lib/python3/dist-packages/rpyc/core/protocol.py", line 441, in sync_request
raise obj
AttributeError: 'MyService' object has no attribute 'exposed_eval'
========= Remote Traceback (1) =========
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/rpyc/core/protocol.py", line 305, in _dispatch_request
res = self._HANDLERS[handler](self, *args)
File "/usr/lib/python3/dist-packages/rpyc/core/protocol.py", line 541, in _handle_getattr
return self._access_attr(oid, name, (), "_rpyc_getattr", "allow_getattr", getattr)
File "/usr/lib/python3/dist-packages/rpyc/core/protocol.py", line 507, in _access_attr
return accessor(obj, name, *args)
File "/usr/lib/python3/dist-packages/rpyc/core/service.py", line 69, in _rpyc_getattr
return getattr(self, name)
AttributeError: 'MyService' object has no attribute 'exposed_eval'
Exited with error code 1.
the server says that the client joined and immediately connected.
rpyc 3.3.0
python 3.10
oc windows 11
The text was updated successfully, but these errors were encountered:
code:
#!/usr/bin/env python3
f = open("/etc/hostname", "r")
lines = f.read().split('\n')
bric_name = lines[0]
f.close()
from time import sleep
import threading
import ev3dev2
import ev3dev2.sound
import evdev
#import gamepad
import rpyc
from rpyc.utils.server import ThreadedServer
print(bric_name)
print(rpyc.version)
if bric_name == "ev3devfrontright":
sound = ev3dev2.sound.Sound()
class MyService(rpyc.Service):
def on_connect(self):
print("new connect")
pass
elif bric_name == "ev3devfrontleft":
pass
elif bric_name == "ev3devbackright":
pass
elif bric_name == "ev3devbackleft":
print("start connect")
conn = rpyc.classic.connect('192.168.0.2')
print("connect accept")
sleep(5)
while True:
print("OK")
sleep(5)
2 controllers
server: ev3devfrontright
client: ev3devbackleft
server starts.
when the client knocks on the server, it joins and immediately disconnects with an error:
Traceback (most recent call last):
File "/home/robot/blrpyc/main.py", line 55, in
conn = rpyc.classic.connect('192.168.0.2')
File "/usr/lib/python3/dist-packages/rpyc/utils/classic.py", line 68, in connect
return factory.connect(host, port, SlaveService, ipv6 = ipv6, keepalive = keepalive)
File "/usr/lib/python3/dist-packages/rpyc/utils/factory.py", line 90, in connect
return connect_stream(s, service, config)
File "/usr/lib/python3/dist-packages/rpyc/utils/factory.py", line 51, in connect_stream
return connect_channel(Channel(stream), service = service, config = config)
File "/usr/lib/python3/dist-packages/rpyc/utils/factory.py", line 40, in connect_channel
return Connection(service, channel, config = config)
File "/usr/lib/python3/dist-packages/rpyc/core/protocol.py", line 151, in init
self._init_service()
File "/usr/lib/python3/dist-packages/rpyc/core/protocol.py", line 154, in _init_service
self._local_root.on_connect()
File "/usr/lib/python3/dist-packages/rpyc/core/service.py", line 146, in on_connect
self._conn.eval = self._conn.root.eval
File "/usr/lib/python3/dist-packages/rpyc/core/netref.py", line 150, in getattr
return syncreq(self, consts.HANDLE_GETATTR, name)
File "/usr/lib/python3/dist-packages/rpyc/core/netref.py", line 71, in syncreq
return conn.sync_request(handler, oid, *args)
File "/usr/lib/python3/dist-packages/rpyc/core/protocol.py", line 441, in sync_request
raise obj
AttributeError: 'MyService' object has no attribute 'exposed_eval'
========= Remote Traceback (1) =========
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/rpyc/core/protocol.py", line 305, in _dispatch_request
res = self._HANDLERS[handler](self, *args)
File "/usr/lib/python3/dist-packages/rpyc/core/protocol.py", line 541, in _handle_getattr
return self._access_attr(oid, name, (), "_rpyc_getattr", "allow_getattr", getattr)
File "/usr/lib/python3/dist-packages/rpyc/core/protocol.py", line 507, in _access_attr
return accessor(obj, name, *args)
File "/usr/lib/python3/dist-packages/rpyc/core/service.py", line 69, in _rpyc_getattr
return getattr(self, name)
AttributeError: 'MyService' object has no attribute 'exposed_eval'
Exited with error code 1.
the server says that the client joined and immediately connected.
rpyc 3.3.0
python 3.10
oc windows 11
The text was updated successfully, but these errors were encountered: