Brewblox-ctl module not found

Hi,
I thought my brewblox installation was working ok but I can’t seem to be able to run the brewblox-ctl command now:

brewer@brewery:~$ cd /home/brewer/brewblox
brewer@brewery:~/brewblox$ brewblox-ctl help
/home/brewer/brewblox/.venv/bin/python3: No module named brewblox_ctl

brewer@brewery:~/brewblox$ echo $PATH
/home/brewer/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

Any suggestions please?

Thank you.

To check whether it can find it:

. .venv/bin/activate
pip3 list | grep brewblox

If not, try reinstalling with

. .venv/bin/activate
pip3 install --prefer-binary ./brewblox-ctl.tar.gz

Thank you Bob.

assuming I have entered this correctly…

(.venv) brewer@brewery:~/brewblox$ pip3 list | grep brewblox
Traceback (most recent call last):
  File "/home/brewer/brewblox/.venv/bin/pip3", line 5, in <module>
    from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'


(.venv) brewer@brewery:~/brewblox$ pip3 install --prefer-binary ./brewblox-ctl.tar.gz
Traceback (most recent call last):
  File "/home/brewer/brewblox/.venv/bin/pip3", line 5, in <module>
    from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'

It looks like your virtualenv itself may have scrambled itself. Next step would be to clear the virtualenv directory, and let the brewblox-ctl entrypoint sort it out again.

rm -rf .venv
brewblox-ctl --help

Fantastic, yes that’s sorted it. Thank you :+1:

Good to hear =)

If you’re running on a Pi, random data corruption may be caused by unplugging it without shutting down first, or it may be the SD card showing its age.
If the card is older, I recommend making semi-regular snapshots, and storing them somewhere else.

Am running on an Odroid N2 with an emmc card. Don’t know if the emmc card is as susceptible but it is a few years old. We have had a few powercuts recently so perhaps that was when things went bad. Sounds good advice to plan for snapshots.

emmc cards do have a maximum number of disk writes, but power cuts are a much more likely suspect for sudden file corruption. Either way, regular backups are always a good idea for data and settings you don’t want to lose if anything happens.