Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error after reboot...power switch again #104

Closed
bartch opened this issue Feb 18, 2018 · 1 comment
Closed

Error after reboot...power switch again #104

bartch opened this issue Feb 18, 2018 · 1 comment
Labels

Comments

@bartch
Copy link

bartch commented Feb 18, 2018

As i wrote before, everything was working fine. Since we are currently starting with the new terrarium we switched of the pi till today...now after booting the software continuously reboots. The Traceback is as follows:

Traceback (most recent call last):
File "/home/pi/TerrariumPI/terrariumPI.py", line 17, in
terrariumEngine = terrariumEngine()
File "/home/pi/TerrariumPI/terrariumEngine.py", line 82, in init
self.environment = terrariumEnvironment(self.sensors, self.power_switches, self.weather, self.is_door_open, self.config.get_environment)
File "/home/pi/TerrariumPI/terrariumEnvironment.py", line 30, in init
self.load_environment()
File "/home/pi/TerrariumPI/terrariumEnvironment.py", line 132, in load_environment
self.__check_available_power_switches()
File "/home/pi/TerrariumPI/terrariumEnvironment.py", line 142, in __check_available_power_switches
del(self.light['power_switches'][switchid])
TypeError: list indices must be integers, not str

@theyosh
Copy link
Owner

theyosh commented Feb 18, 2018

Hi,

sorry to hear that you run in to issues. This is a somewhat known upgrade issue. If you are restarting your terrarium setup, the easiest fix is the remove or rename the setting.cfg file to something else.

Then it will start in a clean setup. When you add your sensors and switches, the history data is still there.

Fixing this in code is rather hard, and only for one version upgrade. So removing the settings.cfg file is the fix for now.

@theyosh theyosh added the bug label Feb 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants