Errors when Running Measure Tool in Docker
See original GitHub issueI have been unsuccessful in running the Measure tool in both python and Docker. Currently, this is what I am getting when trying to run in Docker:
C:\powercalc\utils\measure>docker run --rm --name=measure --env-file=.env -v %CD%/export:/app/export -v %CD%/.persistent:/app/.persistent -it bramgerritsen/powercalc-measure:latest
Powercalc measure: v0.13.2
2021-12-20 00:31:14,755 [INFO] Selected powermeter: manual
2021-12-20 00:31:14,755 [INFO] Selected Light controller: hue
2021-12-20 00:31:14,755 [INFO] Attempting to connect to the bridge...
2021-12-20 00:31:14,759 [INFO] Error opening config file, will attempt bridge registration
Please click the link button on the bridge, than hit enter..
2021-12-20 00:31:15,883 [INFO] Attempting to connect to the bridge...
2021-12-20 00:31:15,886 [INFO] Error opening config file, will attempt bridge registration
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/phue.py", line 735, in connect
with open(self.config_file_path) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/app/light_controller/../.persistent/.python_hue'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/light_controller/hue.py", line 64, in initialize_hue_bridge
bridge = Bridge(ip=bridge_ip, config_file_path=config_file_path)
File "/usr/local/lib/python3.8/site-packages/phue.py", line 628, in __init__
self.connect()
File "/usr/local/lib/python3.8/site-packages/phue.py", line 751, in connect
self.register_app()
File "/usr/local/lib/python3.8/site-packages/phue.py", line 718, in register_app
raise PhueRegistrationException(error_type,
phue.PhueRegistrationException: (101, 'The link button has not been pressed in the last 30 seconds.')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/phue.py", line 735, in connect
with open(self.config_file_path) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/app/light_controller/../.persistent/.python_hue'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "measure.py", line 515, in <module>
main()
File "measure.py", line 505, in main
light_controller = light_controller_factory.create()
File "measure.py", line 452, in create
return factory()
File "measure.py", line 443, in hue
return HueLightController(HUE_BRIDGE_IP)
File "/app/light_controller/hue.py", line 17, in __init__
self.bridge = self.initialize_hue_bridge(bridge_ip)
File "/app/light_controller/hue.py", line 68, in initialize_hue_bridge
bridge = Bridge(ip=bridge_ip, config_file_path=config_file_path)
File "/usr/local/lib/python3.8/site-packages/phue.py", line 628, in __init__
self.connect()
File "/usr/local/lib/python3.8/site-packages/phue.py", line 751, in connect
self.register_app()
File "/usr/local/lib/python3.8/site-packages/phue.py", line 718, in register_app
raise PhueRegistrationException(error_type,
phue.PhueRegistrationException: (101, 'The link button has not been pressed in the last 30 seconds.')
The script seems to start correctly but complains about non-existent phue.py and being unable to open the config file. Any suggestions?
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
How to Fix and Debug Docker Containers Like a Superhero
Container errors are tricky to diagnose, but some investigative magic works wonders. Read along to learn how to debug Docker containers.
Read more >Troubleshoot topics | Docker Documentation
If you are using mounted volumes and get runtime errors indicating an application file is not found, access to a volume mount is...
Read more >Troubleshoot volume errors - Docker Documentation
This topic discusses errors which may occur when you use Docker volumes or bind mounts. Error: Unable to remove filesystem. Some container-based utilities, ......
Read more >Troubleshoot Docker Engine installation
This error may indicate: The Docker daemon isn't running on your system. Start the daemon and try running the command again. Your Docker...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m sorry for you, did you recover fully? Hope we can leave the COVID pandamic behind us soon. Glad you got the measure script working. Do you plan into contributing lights into the repo?
It expects a file
/app/light_controller/../.persistent/.python_hue
which contains the token from the bridge, so you don’t have to click the link button each time again. This file should be written by the phue library on connection to the hue bridge.Did you click the link button? Because the exception also says: “The link button has not been pressed in the last 30 seconds”?