PlatformIO Community

Pio remote start require zope.interface

I try to do a quickstart of pio remote on fedora 36. During the initial start, where it install several stuff, it gives me this error

pio remote agent start
Tool Manager: Installing platformio/contrib-pysite @ ~2.310.0
Unpacking [####################################] 100%
Tool Manager: contrib-pysite@2.310.220222 has been installed!
Collecting twisted[tls]==22.1.0
Using cached Twisted-22.1.0.tar.gz (3.7 MB)
Installing build dependencies … done
Getting requirements to build wheel … done
Preparing metadata (pyproject.toml) … done
Collecting typing-extensions>=3.6.5
Using cached typing_extensions-4.3.0.tar.gz (47 kB)
Installing build dependencies … done
Getting requirements to build wheel … done
Preparing metadata (pyproject.toml) … done
Collecting incremental>=21.3.0
Using cached incremental-21.3.0.tar.gz (17 kB)
Preparing metadata (setup.py) … done
Collecting hyperlink>=17.1.1
Using cached hyperlink-21.0.0.tar.gz (140 kB)
Installing build dependencies … done
Getting requirements to build wheel … done
Preparing metadata (pyproject.toml) … done
Collecting attrs>=19.2.0
Using cached attrs-22.1.0.tar.gz (201 kB)
Installing build dependencies … done
Getting requirements to build wheel … done
Preparing metadata (pyproject.toml) … done
Collecting constantly>=15.1
Using cached constantly-15.1.0.tar.gz (21 kB)
Preparing metadata (setup.py) … done
Collecting zope.interface>=4.4.2
Using cached zope.interface-5.4.0.tar.gz (249 kB)
Preparing metadata (setup.py) … done
Collecting Automat>=0.8.0
Using cached Automat-20.2.0.tar.gz (61 kB)
Preparing metadata (setup.py) … done
Collecting idna>=2.4
Using cached idna-3.3.tar.gz (286 kB)
Preparing metadata (setup.py) … done
Collecting service-identity>=18.1.0
Using cached service-identity-21.1.0.tar.gz (40 kB)
Installing build dependencies … done
Getting requirements to build wheel … done
Preparing metadata (pyproject.toml) … done
Collecting pyopenssl>=16.0.0
Using cached pyOpenSSL-22.0.0.tar.gz (178 kB)
Installing build dependencies … done
Getting requirements to build wheel … done
Preparing metadata (pyproject.toml) … done
Collecting six
Using cached six-1.16.0.tar.gz (34 kB)
Preparing metadata (setup.py) … done
Collecting cryptography>=35.0
Using cached cryptography-38.0.1.tar.gz (599 kB)
Installing build dependencies … done
Getting requirements to build wheel … done
Preparing metadata (pyproject.toml) … done
Collecting pyasn1
Using cached pyasn1-0.4.8.tar.gz (146 kB)
Preparing metadata (setup.py) … done
Collecting pyasn1-modules
Using cached pyasn1-modules-0.2.8.tar.gz (242 kB)
Preparing metadata (setup.py) … done
Collecting setuptools
Using cached setuptools-65.3.0.tar.gz (2.6 MB)
Getting requirements to build wheel … done
Installing backend dependencies … done
Preparing metadata (pyproject.toml) … done
Collecting cffi>=1.12
Using cached cffi-1.15.1.tar.gz (508 kB)
Preparing metadata (setup.py) … done
Collecting pycparser
Using cached pycparser-2.21.tar.gz (170 kB)
Preparing metadata (setup.py) … done
Skipping wheel build for Automat, due to binaries being disabled for it.
Skipping wheel build for constantly, due to binaries being disabled for it.
Skipping wheel build for idna, due to binaries being disabled for it.
Skipping wheel build for incremental, due to binaries being disabled for it.
Skipping wheel build for zope.interface, due to binaries being disabled for it.
Skipping wheel build for pyasn1, due to binaries being disabled for it.
Skipping wheel build for pyasn1-modules, due to binaries being disabled for it.
Skipping wheel build for six, due to binaries being disabled for it.
Skipping wheel build for cffi, due to binaries being disabled for it.
Skipping wheel build for pycparser, due to binaries being disabled for it.
Building wheels for collected packages: attrs, hyperlink, pyopenssl, service-identity, typing-extensions, twisted, cryptography, setuptools
Building wheel for attrs (pyproject.toml) … done
Created wheel for attrs: filename=attrs-22.1.0-py2.py3-none-any.whl size=58795 sha256=2b6f80684300d966308d05cdd180b04af975056c3aebac182a1aff9d2fc76dc0
Stored in directory: /home/ramad/.cache/pip/wheels/00/7a/be/93f65a2acf9fd7865b67f3de1b1d2d43218723f6d1f6a6f31a
Building wheel for hyperlink (pyproject.toml) … done
Created wheel for hyperlink: filename=hyperlink-21.0.0-py2.py3-none-any.whl size=74652 sha256=fd369f4617f22693301ffa33db6c469a6ded3fcbf24ca5a4800c3cb9097cfb30
Stored in directory: /home/ramad/.cache/pip/wheels/27/99/ad/522464658bf1ac739aecc4e70e8a25ad963a973e9d6fb23c0a
Building wheel for pyopenssl (pyproject.toml) … done
Created wheel for pyopenssl: filename=pyOpenSSL-22.0.0-py2.py3-none-any.whl size=55814 sha256=7f246f8537a74fc764d4bb84da1d670966aa0b57a1a4d044031744958c9cc112
Stored in directory: /home/ramad/.cache/pip/wheels/0f/cb/49/46fd89b835a0faf7514a859608cff316a1f8711b3f990a15a1
Building wheel for service-identity (pyproject.toml) … done
Created wheel for service-identity: filename=service_identity-21.1.0-py2.py3-none-any.whl size=12592 sha256=145aa5e5c8b1f92bbbbfa1dfaeed389609c40e5d390f5eb76d8a8b965bab0807
Stored in directory: /home/ramad/.cache/pip/wheels/1f/71/30/334e6562bde8d538eefdf37ee5a0dd12f8976fd2fc348b66b3
Building wheel for typing-extensions (pyproject.toml) … done
Created wheel for typing-extensions: filename=typing_extensions-4.3.0-py3-none-any.whl size=25596 sha256=804454722564b33d850b74f628871f3a928399e0c71b17fc8c5d073aa34d3753
Stored in directory: /home/ramad/.cache/pip/wheels/ab/61/d0/d33395dde624d30e31bece18cd878b6915561a05eb18b70b63
Building wheel for twisted (pyproject.toml) … done
Created wheel for twisted: filename=Twisted-22.1.0-py3-none-any.whl size=3082934 sha256=db5ecd5b2468257ea78af880962adca7a0b5b8e73c1987ae4b88d62cc411043b
Stored in directory: /home/ramad/.cache/pip/wheels/70/c8/c5/a00a93a57880601b911e520004d66d078f56b500f39b349417
Building wheel for cryptography (pyproject.toml) … done
Created wheel for cryptography: filename=cryptography-38.0.1-cp310-cp310-linux_x86_64.whl size=2263424 sha256=db46273c1ac5b65db3792a5e259fd4559587a65590021b53f0a646aefc0184ec
Stored in directory: /home/ramad/.cache/pip/wheels/38/85/c2/e0e9a4846393723fc82538d119665e1c8cd78d919c9f9001e8
Building wheel for setuptools (pyproject.toml) … done
Created wheel for setuptools: filename=setuptools-65.3.0-py3-none-any.whl size=1232493 sha256=65c0557395960820efe354e76688f7ca3c22da2ef63277e91e3a060c9f606c3b
Stored in directory: /home/ramad/.cache/pip/wheels/3a/88/3f/144cbe6ad6b46573f48d2c5b18fb3d27036e6506c9429c31ae
Successfully built attrs hyperlink pyopenssl service-identity typing-extensions twisted cryptography setuptools
Installing collected packages: pyasn1, incremental, constantly, typing-extensions, six, setuptools, pycparser, pyasn1-modules, idna, attrs, zope.interface, hyperlink, cffi, Automat, twisted, cryptography, service-identity, pyopenssl
Running setup.py install for pyasn1 … done
Running setup.py install for incremental … done
Running setup.py install for constantly … done
Running setup.py install for six … done
Running setup.py install for pycparser … done
Running setup.py install for pyasn1-modules … done
Running setup.py install for idna … done
Running setup.py install for zope.interface … done
Running setup.py install for cffi … done
Running setup.py install for Automat … done
Successfully installed Automat-20.2.0 attrs-22.1.0 cffi constantly-15.1.0 cryptography-38.0.1 hyperlink-21.0.0 idna-3.3 incremental-21.3.0 pyasn1-0.4.8 pyasn1-modules-0.2.8 pycparser-2.21 pyopenssl-22.0.0 service-identity-21.1.0 setuptools-65.3.0 six-1.16.0 twisted-22.1.0 typing-extensions-4.3.0 zope.interface
Error: Traceback (most recent call last):
File “/home/ramad/.platformio/penv/lib64/python3.10/site-packages/platformio/main.py”, line 102, in main
cli() # pylint: disable=no-value-for-parameter
File “/home/ramad/.platformio/penv/lib64/python3.10/site-packages/click/core.py”, line 1130, in call
return self.main(*args, **kwargs)
File “/home/ramad/.platformio/penv/lib64/python3.10/site-packages/click/core.py”, line 1055, in main
rv = self.invoke(ctx)
File “/home/ramad/.platformio/penv/lib64/python3.10/site-packages/platformio/cli.py”, line 71, in invoke
return super().invoke(ctx)
File “/home/ramad/.platformio/penv/lib64/python3.10/site-packages/click/core.py”, line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/ramad/.platformio/penv/lib64/python3.10/site-packages/click/core.py”, line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/ramad/.platformio/penv/lib64/python3.10/site-packages/click/core.py”, line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/ramad/.platformio/penv/lib64/python3.10/site-packages/click/core.py”, line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/ramad/.platformio/penv/lib64/python3.10/site-packages/click/core.py”, line 760, in invoke
return __callback(*args, **kwargs)
File “/home/ramad/.platformio/penv/lib64/python3.10/site-packages/platformio/remote/cli.py”, line 62, in remote_agent_start
from platformio.remote.client.agent_service import RemoteAgentService
File “/home/ramad/.platformio/penv/lib64/python3.10/site-packages/platformio/remote/client/agent_service.py”, line 17, in
from twisted.logger import LogLevel # pylint: disable=import-error
File “/home/ramad/.platformio/packages/contrib-pysite/twisted/logger/init.py”, line 93, in
from ._flatten import extractField
File “/home/ramad/.platformio/packages/contrib-pysite/twisted/logger/_flatten.py”, line 15, in
from ._interfaces import LogEvent
File “/home/ramad/.platformio/packages/contrib-pysite/twisted/logger/_interfaces.py”, line 10, in
from zope.interface import Interface
ModuleNotFoundError: No module named ‘zope.interface’

============================================================

An unexpected error occurred. Further steps:

============================================================

I have tried installing zope by

pip install zope

However, it does not fix the issue.

Any idea why this happens?

CC @ivankravets possible bug

SOLVED:

update libraries: sudo dnf install libpython3-devel libffi-devel openssl-devel
update pio through pip: pip install -U platformio

These might seem redundant, but turns out I have a missing dependency that was required for pio remote

Good luck