PlatformIO Community

PIO broke down on my raspberry pi 4

Hi there! I was using PIO CLI to deploy stuff from a raspberry pi to an amtelavr device connected via usb.

Recently, the command stopped working

pio remote agent start

it displays a message:

Successfully installed ifaddr-0.1.7 zeroconf-0.26.0
Error: Traceback (most recent call last):
  File "/home/german/.platformio/penv/lib/python3.8/site-packages/platformio/__main__.py", line 109, in main
    cli()  # pylint: disable=no-value-for-parameter
  File "/home/german/.platformio/penv/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/german/.platformio/penv/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/german/.platformio/penv/lib/python3.8/site-packages/platformio/commands/__init__.py", line 44, in invoke
    return super(PlatformioCLI, self).invoke(ctx)
  File "/home/german/.platformio/penv/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/german/.platformio/penv/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/german/.platformio/penv/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/german/.platformio/penv/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/german/.platformio/penv/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/german/.platformio/penv/lib/python3.8/site-packages/platformio/commands/remote/command.py", line 66, in remote_agent_start
    from platformio.commands.remote.client.agent_service import RemoteAgentService
  File "/home/german/.platformio/penv/lib/python3.8/site-packages/platformio/commands/remote/client/agent_service.py", line 25, in <module>
    from platformio.commands.remote.client.base import RemoteClientBase
  File "/home/german/.platformio/penv/lib/python3.8/site-packages/platformio/commands/remote/client/base.py", line 30, in <module>
    from platformio.commands.remote.factory.ssl import SSLContextFactory
  File "/home/german/.platformio/penv/lib/python3.8/site-packages/platformio/commands/remote/factory/ssl.py", line 16, in <module>
    from OpenSSL import SSL  # pylint: disable=import-error
  File "/home/german/.platformio/packages/contrib-pysite/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/home/german/.platformio/packages/contrib-pysite/OpenSSL/crypto.py", line 12, in <module>
    from cryptography import x509
  File "/home/german/.platformio/packages/contrib-pysite/cryptography/x509/__init__.py", line 8, in <module>
    from cryptography.x509.base import (
  File "/home/german/.platformio/packages/contrib-pysite/cryptography/x509/base.py", line 15, in <module>
    from cryptography.hazmat.backends import _get_backend
ImportError: cannot import name '_get_backend' from 'cryptography.hazmat.backends' (/home/german/.platformio/packages/contrib-pysite/cryptography/hazmat/backends/__init__.py)

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

An unexpected error occurred. Further steps:

* Verify that you have the latest version of PlatformIO using
  `pip install -U platformio` command

* Try to find answer in FAQ Troubleshooting section
  https://docs.platformio.org/page/faq.html

* Report this problem to the developers
  https://github.com/platformio/platformio-core/issues

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

Hi!

I have the same issue.

Already reported and fixed a week ago as you can see in https://github.com/platformio/platformio-core/issues/3652. Upgrade to the latest dev version using pio upgrade --dev.

1 Like

Please upgrade PlatformIO Core to the latest version via pio upgrade.

1 Like