Pms_agent ModuleNotFoundError: No module named 'pms_api'

Since updating the python libs to make the API work, now the pms_agent doesn’t work any more.

In journalctl I see the following errors. Any ideas how to fix this?

Jul 21 11:07:07 ice systemd[1]: Stopped Sixfab PMS Agent.
Jul 21 11:07:07 ice systemd[1]: Started Sixfab PMS Agent.
Jul 21 11:07:08 ice python3[28679]: Traceback (most recent call last):
Jul 21 11:07:08 ice python3[28679]:   File "agent.py", line 4, in <module>
Jul 21 11:07:08 ice python3[28679]:     from core import Agent
Jul 21 11:07:08 ice python3[28679]:   File "/opt/sixfab/pms/agent/core/__init__.py", line 7, in <module>
Jul 21 11:07:08 ice python3[28679]:     from pms_api import SixfabPMS
Jul 21 11:07:08 ice python3[28679]: ModuleNotFoundError: No module named 'pms_api'
Jul 21 11:07:08 ice systemd[1]: pms_agent.service: Main process exited, code=exited, status=1/FAILURE
Jul 21 11:07:08 ice systemd[1]: pms_agent.service: Failed with result 'exit-code'.
Jul 21 11:07:11 ice systemd[1]: pms_agent.service: Service RestartSec=3s expired, scheduling restart.
Jul 21 11:07:11 ice systemd[1]: pms_agent.service: Scheduled restart job, restart counter is at 23383.
Jul 21 11:07:11 ice systemd[1]: Stopped Sixfab PMS Agent.
Jul 21 11:07:11 ice systemd[1]: Started Sixfab PMS Agent.

Bump… having the same issue. Can’t get all_test.py to run because pms_api doesn’t exist. Power_api is installed, but that’s apparently not the same.

-Jim

After a little more research, I’m guessing the mysterious curl command that you download upon device creation pip installs pms_agent. It didn’t work for me, but after a little sleuthing, I found git.sixfab.com pms_agent is in sixfab-power/api . There’s got to be something in there to tip us off on how to install pms_api… I’m searching but am away from my RPI at work… will pick it up tomorrow.

It’s a shame the documentation for this otherwise really well made product is so poor.

-Jim

I fixed it in the end by creating a new device in their web interface and getting the new secret curl command. I executed it on the pi and it fixed the original settings and the original device settings were able to connect again the their site. then I deleted the new device.

1 Like

Thanks! I’m surprised that the old device worked, and that the hat didn’t assume the identity of the newly created device… very interesting.

Could you share the ls -l of your /opt/sixfab directory?

-Jim

Not much in there so I’m including a list of all files

jason@ice:/opt/sixfab $ find . -not -iwholename '*.git*'
.
./pms
./pms/agent
./pms/agent/core
./pms/agent/core/helpers
./pms/agent/core/helpers/configs.py
./pms/agent/core/helpers/network.py
./pms/agent/core/helpers/__init__.py
./pms/agent/core/helpers/logger.py
./pms/agent/core/modules
./pms/agent/core/modules/updater.py
./pms/agent/core/modules/set_configurations.py
./pms/agent/core/modules/healthcheck.py
./pms/agent/core/modules/fixer.py
./pms/agent/core/modules/read_data.py
./pms/agent/core/modules/__init__.py
./pms/agent/core/modules/recovery.py
./pms/agent/core/__init__.py
./pms/agent/requirements.txt
./pms/agent/agent.py
./pms/firmwares
./pms/firmwares/sixfab_pms_firmware_v0.2.4.bin
./pms/firmwares/latest_version
./pms/firmwares/sixfab_pms_firmware_v0.2.6.bin
./pms/firmwares/sixfab_pms_firmware_v0.3.0.bin
./pms/firmwares/sixfab_pms_firmware_v0.2.3.bin
./pms/firmwares/sixfab_pms_firmware_v0.2.7.bin
./pms/firmwares/sixfab_pms_firmware_v0.2.5.bin
./pms/api
./pms/api/pms_api
./pms/api/pms_api/pms_command.py
./pms/api/pms_api/exceptions.py
./pms/api/pms_api/definitions.py
./pms/api/pms_api/pms_api.py
./pms/api/pms_api/event.py
./pms/api/pms_api/__init__.py
./pms/api/README.md
./pms/api/requirements.txt
./pms/api/example
./pms/api/example/example5.py
./pms/api/example/example3.py
./pms/api/example/update_example.py
./pms/api/example/clear.py
./pms/api/example/example4.py
./pms/api/example/example2.py
./pms/api/example/example.py
./pms/api/example/all_test.py
./pms/api/__init__.py
./pms/api/setup.py
./.env
./.agent-fixes
1 Like

That is super helpful, thank you!