Related
I am getting this "Forbidden for url" error when using zeep. Does someone knows what the root cause is?
I have tried to use some options from the Client object of zeep but to no avail.
Or is it something wrong in my WSDL file?
The strange part is that this code used to work fine a few months ago, and suddenly started getting this error.
This is the trace back from the error:
Traceback (most recent call last):
File "/usr/src/app/attpcdaq/daq/tasks.py", line 33, in eccserver_refresh_state_task
ecc_server.refresh_state()
File "/usr/src/app/attpcdaq/daq/models.py", line 428, in refresh_state
client = self._get_soap_client()
File "/usr/src/app/attpcdaq/daq/models.py", line 308, in _get_soap_client
return EccClient(self.ecc_url)
File "/usr/src/app/attpcdaq/daq/models.py", line 65, in __init__
client = SoapClient(wsdl_url) # Loads the service definition from ecc.wsdl
File "/usr/local/lib/python3.7/site-packages/zeep/client.py", line 73, in __init__
self.wsdl = Document(wsdl, self.transport, settings=self.settings)
File "/usr/local/lib/python3.7/site-packages/zeep/wsdl/wsdl.py", line 92, in __init__
self.load(location)
File "/usr/local/lib/python3.7/site-packages/zeep/wsdl/wsdl.py", line 97, in load
root_definitions = Definition(self, document, self.location)
File "/usr/local/lib/python3.7/site-packages/zeep/wsdl/wsdl.py", line 193, in __init__
self._load(doc)
File "/usr/local/lib/python3.7/site-packages/zeep/wsdl/wsdl.py", line 198, in _load
self.parse_types(doc)
File "/usr/local/lib/python3.7/site-packages/zeep/wsdl/wsdl.py", line 330, in parse_types
self.types.add_documents(schema_nodes, self.location)
File "/usr/local/lib/python3.7/site-packages/zeep/xsd/schema.py", line 111, in add_documents
document = self.create_new_document(node, location)
File "/usr/local/lib/python3.7/site-packages/zeep/xsd/schema.py", line 195, in create_new_document
schema.load(self, node)
File "/usr/local/lib/python3.7/site-packages/zeep/xsd/schema.py", line 421, in load
visitor.visit_schema(node)
File "/usr/local/lib/python3.7/site-packages/zeep/xsd/visitor.py", line 165, in visit_schema
self.process(child, parent=node)
File "/usr/local/lib/python3.7/site-packages/zeep/xsd/visitor.py", line 93, in process
result = visit_func(self, node, parent)
File "/usr/local/lib/python3.7/site-packages/zeep/xsd/visitor.py", line 238, in visit_import
schema_node = self._retrieve_data(location, base_url=self.document._location)
File "/usr/local/lib/python3.7/site-packages/zeep/xsd/visitor.py", line 1199, in _retrieve_data
url, self.schema._transport, base_url, settings=self.schema.settings
File "/usr/local/lib/python3.7/site-packages/zeep/loader.py", line 87, in load_external
content = transport.load(url)
File "/usr/local/lib/python3.7/site-packages/zeep/transports.py", line 122, in load
content = self._load_remote_data(url)
File "/usr/local/lib/python3.7/site-packages/zeep/transports.py", line 135, in _load_remote_data
response.raise_for_status()
File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 960, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://schemas.xmlsoap.org/soap/encoding/
You need to cache the WSDL by enabling transport caching:
from zeep.cache import InMemoryCache
Client(soap_url, transport=Transport(
cache=InMemoryCache(),
))
The official documentation recommends using the SqliteCache instead of the InMemoryCache:
from zeep import Client
from zeep.cache import SqliteCache
from zeep.transports import Transport
transport = Transport(cache=SqliteCache())
client = Client(
'http://www.webservicex.net/ConvertSpeed.asmx?WSDL',
transport=transport)
Trying to set up static assets on a Pyramid app. I used the following call:
config.add_static_view(name='static', path='toolsofknowledge:static')
The file main.css is stored under toolsofknowledge/static/main.css, as expected. The toolsofknowledge package is installed locally with an editable link, using pip3 install -e ..
Requesting http://localhost:8080/static/main.css with curl causes this exception on the server:
amoe#cslp019129 $ PYRAMID_RELOAD_TEMPLATES=1 pserve3 --reload development.ini
Starting monitor for PID 3796.
Starting server in PID 3796.
Serving on http://localhost:8080
Serving on http://localhost:8080
ERROR:waitress:Exception when serving /static/main.css
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pyramid/tweens.py", line 13, in _error_handler
response = request.invoke_exception_view(exc_info)
File "/usr/lib/python3/dist-packages/pyramid/view.py", line 769, in invoke_exception_view
raise HTTPNotFound
pyramid.httpexceptions.HTTPNotFound: The resource could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/waitress/channel.py", line 336, in service
task.service()
File "/usr/lib/python3/dist-packages/waitress/task.py", line 175, in service
self.execute()
File "/usr/lib/python3/dist-packages/waitress/task.py", line 452, in execute
app_iter = self.channel.server.application(env, start_response)
File "/usr/lib/python3/dist-packages/pyramid/router.py", line 270, in __call__
response = self.execution_policy(environ, self)
File "/usr/lib/python3/dist-packages/pyramid/router.py", line 279, in default_execution_policy
return request.invoke_exception_view(reraise=True)
File "/usr/lib/python3/dist-packages/pyramid/view.py", line 768, in invoke_exception_view
reraise_(*exc_info)
File "/usr/lib/python3/dist-packages/pyramid/compat.py", line 179, in reraise
raise value
File "/usr/lib/python3/dist-packages/pyramid/router.py", line 277, in default_execution_policy
return router.invoke_request(request)
File "/usr/lib/python3/dist-packages/pyramid/router.py", line 249, in invoke_request
response = handle_request(request)
File "/usr/lib/python3/dist-packages/pyramid/tweens.py", line 43, in excview_tween
response = _error_handler(request, exc)
File "/usr/lib/python3/dist-packages/pyramid/tweens.py", line 17, in _error_handler
reraise(*exc_info)
File "/usr/lib/python3/dist-packages/pyramid/compat.py", line 179, in reraise
raise value
File "/usr/lib/python3/dist-packages/pyramid/tweens.py", line 41, in excview_tween
response = handler(request)
File "/usr/lib/python3/dist-packages/pyramid/router.py", line 148, in handle_request
registry, request, context, context_iface, view_name
File "/usr/lib/python3/dist-packages/pyramid/view.py", line 657, in _call_view
response = view_callable(context, request)
File "/usr/lib/python3/dist-packages/pyramid/viewderivers.py", line 401, in viewresult_to_response
result = view(context, request)
File "/usr/lib/python3/dist-packages/pyramid/static.py", line 102, in __call__
if resource_isdir(self.package_name, resource_path):
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1138, in resource_isdir
return get_provider(package_or_requirement).resource_isdir(
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 364, in get_provider
return _find_adapter(_provider_factories, loader)(module)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1392, in __init__
self.module_path = os.path.dirname(getattr(module, '__file__', ''))
File "/usr/lib/python3.7/posixpath.py", line 156, in dirname
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Python 3.7, Pyramid 1.10.2.
Solution: add __init__.py to toolsofknowledge directory.
The problem is quite simple -- the toolsofknowledge package was not a real package, despite being installed, as it was missing an __init__.py. This causes toolsofknowledge.__loader__ to be an instance of NamespaceLoader, when it should be SourceFileLoader. Obviously, pkg_resources cannot resolve resources relative to something that's not a real package. Arguably it should handle this case more smoothly though.
Has anyone tried using python-docx on google cloud functions?
I am just getting started and can't get a simple code below work:
from docx import Document
document = Document('blank_doc.docx')
document.save('test.docx');
Edit 1:
Here's the log for above snippet:
2021-02-05T15:39:56.658Ztest1w0yivt7dw3gw Traceback (most recent call last):
File "/env/local/lib/python3.7/site-packages/google/cloud/functions/worker_v2.py",
line 402, in run_http_function result = _function_handler.invoke_user_function(flask.request)
File "/env/local/lib/python3.7/site-packages/google/cloud/functions/worker_v2.py",
line 268, in invoke_user_function return call_user_function(request_or_event)
File "/env/local/lib/python3.7/site-packages/google/cloud/functions/worker_v2.py",
line 261, in call_user_function return self._user_function(request_or_event)
File "/user_code/main.py",
line 6, in test1 document.save('document.docx')
File "/env/local/lib/python3.7/site-packages/docx/document.py",
line 135, in save self._part.save(path_or_stream)
File "/env/local/lib/python3.7/site-packages/docx/parts/document.py",
line 111, in save self.package.save(path_or_stream)
File "/env/local/lib/python3.7/site-packages/docx/opc/package.py",
line 172, in save PackageWriter.write(pkg_file, self.rels, self.parts)
File "/env/local/lib/python3.7/site-packages/docx/opc/pkgwriter.py",
line 32, in write phys_writer = PhysPkgWriter(pkg_file)
File "/env/local/lib/python3.7/site-packages/docx/opc/phys_pkg.py",
line 141, in __init__ self._zipf = ZipFile(pkg_file, 'w', compression=ZIP_DEFLATED)
File "/opt/python3.7/lib/python3.7/zipfile.py",
line 1240, in __init__ self.fp = io.open(file, filemode) OSError: [Errno 30] Read-only file system: 'document.docx'
Traceback (most recent call last): File "/env/local/lib/python3.7/site-packages/google/cloud/functions/worker_v2.py",
line 402, in run_http_function result = _function_handler.invoke_user_function(flask.request)
File "/env/local/lib/python3.7/site-packages/google/cloud/functions/worker_v2.py",
line 268, in invoke_user_function return call_user_function(request_or_event)
File "/env/local/lib/python3.7/site-packages/google/cloud/functions/worker_v2.py",
line 261, in call_user_function return self._user_function(request_or_event)
File "/user_code/main.py", line 6, in test1 document.save('document.docx')
File "/env/local/lib/python3.7/site-packages/docx/document.py",
line 135, in save self._part.save(path_or_stream)
File "/env/local/lib/python3.7/site-packages/docx/parts/document.py",
line 111, in save self.package.save(path_or_stream)
File "/env/local/lib/python3.7/site-packages/docx/opc/package.py",
line 172, in save PackageWriter.write(pkg_file, self.rels, self.parts)
File "/env/local/lib/python3.7/site-packages/docx/opc/pkgwriter.py",
line 32, in write phys_writer = PhysPkgWriter(pkg_file)
File "/env/local/lib/python3.7/site-packages/docx/opc/phys_pkg.py",
line 141, in __init__ self._zipf = ZipFile(pkg_file, 'w', compression=ZIP_DEFLATED)
File "/opt/python3.7/lib/python3.7/zipfile.py",
line 1240, in __init__ self.fp = io.open(file, filemode) OSError: [Errno 30] Read-only file system: 'document.docx'
I thought this has something to do with the bucket storage thing and tried below but can't seem to get it to work. Appreciate help
from google.cloud import storage
from docx import Document
client = storage.Client()
import io
def test(request):
file_stream = io.BytesIO()
BUCKET = 'out_bucket'
document = Document('blank_doc.docx')
bucket = client.get_bucket(BUCKET)
document.save(file_stream)
file_stream = file_stream.encode('utf-8')
newblob = bucket.blob(file_stream)
newblob.upload_from_file('document.docx')
Edit 2:
Sorry, here is the log for snippet above:
2021-02-05T15:30:53.665Ztest18s7xo9gksz2 Traceback (most recent call last):
File "/env/local/lib/python3.7/site-packages/google/cloud/functions/worker_v2.py",
line 402, in run_http_function result = _function_handler.invoke_user_function(flask.request)
File "/env/local/lib/python3.7/site-packages/google/cloud/functions/worker_v2.py",
line 268, in invoke_user_function return call_user_function(request_or_event)
File "/env/local/lib/python3.7/site-packages/google/cloud/functions/worker_v2.py",
line 261, in call_user_function return self._user_function(request_or_event)
File "/user_code/main.py",
line 13, in test file_stream = file_stream.encode('utf-8') AttributeError:
'_io.BytesIO' object has no attribute 'encode'
Traceback (most recent call last):
File "/env/local/lib/python3.7/site-packages/google/cloud/functions/worker_v2.py",
line 402, in run_http_function result = _function_handler.invoke_user_function(flask.request)
File "/env/local/lib/python3.7/site-packages/google/cloud/functions/worker_v2.py",
line 268, in invoke_user_function return call_user_function(request_or_event)
File "/env/local/lib/python3.7/site-packages/google/cloud/functions/worker_v2.py",
line 261, in call_user_function return self._user_function(request_or_event)
File "/user_code/main.py",
line 13, in test file_stream = file_stream.encode('utf-8') AttributeError:
'_io.BytesIO' object has no attribute 'encode'
On Cloud Functions the only path where you can write documents is on /tmp as mentioned here, so I rewrote the Cloud Function hello_world as:
from docx import Document
def hello_world(request):
document = Document()
document.save('/tmp/test.docx');
request_json = request.get_json()
if request.args and 'message' in request.args:
return request.args.get('message')
elif request_json and 'message' in request_json:
return request_json['message']
else:
return f'Hello World!'
And in the requirements.txt file added the next line:
python-docx
I am currently trying to figure out how to use netmiko to automate some of my routine work.Such as getting configuration backup, creating vlans etc.I've managed to use it on Aruba and Huawei Switches without problem.But on alcatel switch I'm facing this issue:
Unknown exception: module 'cryptography.utils' has no attribute 'bit_length'
Traceback (most recent call last):
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\transport.py", line 2075, in run
self.kex_engine.parse_next(ptype, m)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\kex_gex.py", line 101, in parse_next
return self._parse_kexdh_gex_reply(m)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\kex_gex.py", line 281, in _parse_kexdh_gex_reply
self.transport._verify_key(host_key, sig)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\transport.py", line 1886, in _verify_key
if not key.verify_ssh_sig(self.H, Message(sig)):
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\dsskey.py", line 148, in verify_ssh_sig
key = dsa.DSAPublicNumbers(
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\cryptography\hazmat\primitives\asymmetric\dsa.py", line 212, in public_key
return backend.load_dsa_public_numbers(self)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\cryptography\hazmat\backends\openssl\backend.py", line 871, in load_dsa_public_numbers
dsa._check_dsa_parameters(numbers.parameter_numbers)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\netmiko\tplink\tplink_jetstream.py", line 145, in _override_check_dsa_parameters
if crypto_utils.bit_length(parameters.q) not in [160, 256]:
AttributeError: module 'cryptography.utils' has no attribute 'bit_length'
Traceback (most recent call last):
File "C:\Users\melih.celik\Desktop\New_Backup\Yedek\Coding\Rand stuff\ssh_deneme(toplu).py", line 75, in
config_backup(cihaz_secim,ip_address,username,password)
File "C:\Users\melih.celik\Desktop\New_Backup\Yedek\Coding\Rand stuff\ssh_deneme(toplu).py", line 12, in config_backup
net_connect=ConnectHandler(**switch) #Baglanti kuruldu.
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\netmiko\ssh_dispatcher.py", line 312, in ConnectHandler
return ConnectionClass(*args, **kwargs)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\netmiko\base_connection.py", line 346, in init
self._open()
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\netmiko\base_connection.py", line 351, in _open
self.establish_connection()
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\netmiko\base_connection.py", line 920, in establish_connection
self.remote_conn_pre.connect(**ssh_connect_params)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\client.py", line 406, in connect
t.start_client(timeout=timeout)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\transport.py", line 660, in start_client
raise e
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\transport.py", line 2075, in run
self.kex_engine.parse_next(ptype, m)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\kex_gex.py", line 101, in parse_next
return self._parse_kexdh_gex_reply(m)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\kex_gex.py", line 281, in _parse_kexdh_gex_reply
self.transport._verify_key(host_key, sig)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\transport.py", line 1886, in _verify_key
if not key.verify_ssh_sig(self.H, Message(sig)):
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\dsskey.py", line 148, in verify_ssh_sig
key = dsa.DSAPublicNumbers(
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\cryptography\hazmat\primitives\asymmetric\dsa.py", line 212, in public_key
return backend.load_dsa_public_numbers(self)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\cryptography\hazmat\backends\openssl\backend.py", line 871, in load_dsa_public_numbers
dsa._check_dsa_parameters(numbers.parameter_numbers)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\netmiko\tplink\tplink_jetstream.py", line 145, in _override_check_dsa_parameters
if crypto_utils.bit_length(parameters.q) not in [160, 256]:
AttributeError: module 'cryptography.utils' has no attribute 'bit_length'
Thanks for your help in advance.
It looks like tplink_jetstream.py assumes that a (now removed) helper function is available to it. The simplest fix here would be to go into that file and modify the line containing crypto_utils.bit_length(parameters.q) to read parameters.q.bit_length() instead.
I installed ev3dev on my ev3 brick so I could create programs on it with python. I am trying to use the "rpyc" library for python which can be found here. However, when I try to run this basic script which is given as an example on the link above:
import rpyc
conn = rpyc.classic.connect('192.168.137.3') # host name or IP address of the EV3
ev3 = conn.modules['ev3dev.ev3'] # import ev3dev.ev3 remotely
m = ev3.LargeMotor('outA')
m.run_timed(time_sp=1000, speed_sp=600)
I get multiple errors thrown at me through the terminal followed by the connection closing. I have followed all the instructions on the page and I also started the server script on the ev3 brick beforehand. When I run the above program the errors from python are displayed:
Traceback (most recent call last):
File "C:/Python27/cooode/moottertest.py", line 2, in <module>
conn = rpyc.classic.connect('192.168.137.3') # host name or IP address of the EV3
File "C:\Python27\lib\site-packages\rpyc\utils\classic.py", line 65, in connect
return factory.connect(host, port, SlaveService, ipv6 = ipv6)
File "C:\Python27\lib\site-packages\rpyc\utils\factory.py", line 90, in connect
return connect_stream(s, service, config)
File "C:\Python27\lib\site-packages\rpyc\utils\factory.py", line 51, in connect_stream
return connect_channel(Channel(stream), service = service, config = config)
File "C:\Python27\lib\site-packages\rpyc\utils\factory.py", line 40, in connect_channel
return Connection(service, channel, config = config)
File "C:\Python27\lib\site-packages\rpyc\core\protocol.py", line 147, in __init__
self._init_service()
File "C:\Python27\lib\site-packages\rpyc\core\protocol.py", line 150, in _init_service
self._local_root.on_connect()
File "C:\Python27\lib\site-packages\rpyc\core\service.py", line 145, in on_connect
self._conn.builtin = self._conn.modules.__builtin__
File "C:\Python27\lib\site-packages\rpyc\core\service.py", line 114, in __getattr__
return self[name]
File "C:\Python27\lib\site-packages\rpyc\core\service.py", line 111, in __getitem__
self.__cache[name] = self.__getmodule(name)
File "C:\Python27\lib\site-packages\rpyc\core\netref.py", line 196, in __call__
return syncreq(_self, consts.HANDLE_CALL, args, kwargs)
File "C:\Python27\lib\site-packages\rpyc\core\netref.py", line 71, in syncreq
return conn.sync_request(handler, oid, *args)
File "C:\Python27\lib\site-packages\rpyc\core\protocol.py", line 435, in sync_request
self.serve(0.1)
File "C:\Python27\lib\site-packages\rpyc\core\protocol.py", line 383, in serve
data = self._recv(timeout, wait_for_lock = True)
File "C:\Python27\lib\site-packages\rpyc\core\protocol.py", line 341, in _recv
data = self._channel.recv()
File "C:\Python27\lib\site-packages\rpyc\core\channel.py", line 50, in recv
header = self.stream.read(self.FRAME_HEADER.size)
File "C:\Python27\lib\site-packages\rpyc\core\stream.py", line 190, in read
raise EOFError("connection closed by peer")
EOFError: connection closed by peer
>>>
Then on my SSH session, here are the errors that are displayed:
robot#ev3dev:~$ ./rpyc_server.sh
INFO:SLAVE/18812:server started on [0.0.0.0]:18812
INFO:SLAVE/18812:accepted 192.168.137.1:5725
INFO:SLAVE/18812:welcome [192.168.137.1]:5725
INFO:SLAVE/18812:goodbye [192.168.137.1]:5725
ERROR:SLAVE/18812:client connection terminated abruptly
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/rpyc/utils/server.py", line 172, in _authenticate_and_serve_client
self._serve_client(sock2, credentials)
File "/usr/lib/python3/dist-packages/rpyc/utils/server.py", line 197, in _serve_client
conn._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 150, in on_connect
self._conn.builtin = self._conn.modules.builtins
File "/usr/lib/python3/dist-packages/rpyc/core/service.py", line 121, in __getattr__
return self[name]
File "/usr/lib/python3/dist-packages/rpyc/core/service.py", line 118, in __getitem__
self.__cache[name] = self.__getmodule(name)
TypeError: 'b'instancemethod'' object is not callable
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
self.run()
File "/usr/lib/python3.4/threading.py", line 868, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3/dist-packages/rpyc/utils/server.py", line 172, in _authenticate_and_serve_client
self._serve_client(sock2, credentials)
File "/usr/lib/python3/dist-packages/rpyc/utils/server.py", line 197, in _serve_client
conn._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 150, in on_connect
self._conn.builtin = self._conn.modules.builtins
File "/usr/lib/python3/dist-packages/rpyc/core/service.py", line 121, in __getattr__
return self[name]
File "/usr/lib/python3/dist-packages/rpyc/core/service.py", line 118, in __getitem__
self.__cache[name] = self.__getmodule(name)
TypeError: 'b'instancemethod'' object is not callable
What is going wrong here in these errors?
Are you connecting python2 and python3? ev3dev uses python2.
Use pyenv to install python3 and use it so that your python version of PC and ev3 are the same.
https://gist.github.com/jaydenkieran/75b2bbc32b5b70c4fdfb161ecdb6daa2
You might need to run this command first to install through curl:
sudo apt-get install curl