balena-labs-projects / connector

Auto-configured data connector block based on Telegraf
15 stars 8 forks source link

ModuleNotFound on raspberry pi 4 #43

Closed pipex closed 1 year ago

pipex commented 2 years ago

It looks like python is not reading packages under /root/.local. I get this error when running autowire

root@cceab6e:~# balena run --rm -ti --privileged balenablocks/connector sh
/app # python3 autowire.py
Traceback (most recent call last):
  File "/app/autowire.py", line 6, in <module>
    from pluginbase import PluginBase
ModuleNotFoundError: No module named 'pluginbase'

This seems to work on pi 3

jellyfish-bot commented 2 years ago

[pipex] This issue has attached support thread https://jel.ly.fish/cfb29ce5-728b-460f-8859-f84cb03b4b47

phil-d-wilson commented 2 years ago

Fixed by #44 - the build and run image layers were using different versions of python. I've pinned both to 3.9 and the block runs fine again. @pipex

alanb128 commented 2 years ago

I'm getting this same error on the new bh.cr/balenablocks/connector-aarch64 image on a Pi 4. I'm not sure if it's the same cause though!

21.04.22 01:24:36 (-0400)  connector  
21.04.22 01:24:36 (-0400)  connector  balenaBlocks connector version: 1.1.5
21.04.22 01:24:36 (-0400)  connector  Changing hostname to e4ac12c
21.04.22 01:24:36 (-0400)  connector  Generating config
21.04.22 01:24:36 (-0400)  connector  Traceback (most recent call last):
21.04.22 01:24:36 (-0400)  connector    File "/app/./autowire.py", line 6, in <module>
21.04.22 01:24:36 (-0400)  connector      from pluginbase import PluginBase
21.04.22 01:24:36 (-0400)  connector  ModuleNotFoundError: No module named 'pluginbase'
21.04.22 01:24:37 (-0400) Service exited 'connector sha256:25d8d3f88d8fdd8db20bc39045c78517381968910fb5a1e287204ca4beec90db'
21.04.22 01:24:42 (-0400)  influxdb  [httpd] 172.17.0.2 - - [21/Apr/2022:05:24:42 +0000] "GET /query?db=balena&q=show+field+keys HTTP/1.1" 200 70 "-" "Python-urllib/3.7" 59580c14-c133-11ec-8326-0242ac110003 1322
21.04.22 01:24:42 (-0400)  dashboard  Interim dashboard sync skipped: No schema found.
21.04.22 01:24:47 (-0400) Killing service 'influxdb sha256:5426da1fe5416ab2ec19ea8598054c840af9e41a56b877c94bcb533e54abf675'
jellyfish-bot commented 1 year ago

[myarmolinsky] This has attached https://jel.ly.fish/4588b939-3029-4feb-9467-31bc65a83d53

diverjoe commented 1 year ago

I am have the same issue as alanb128 although I am on pi3 B+/64. Other than that, it is the EXACT error mst. Also, what is Jellyfish and what do those links have to do with solutions to this issue and how do I get access?

alanb128 commented 1 year ago

@diverjoe Jellyfish is our internal system for tracking support issues.

I have a fix for this issue, will merge it in the next day or so.

alanb128 commented 1 year ago

On the aarch64 version, there was still a mismatch (3.9.16 vs. 3.9.15) so it has been re-pinned to the highest version where a "run" and "build" version exist. Fixed by #60