tingxin / DevIoT_RaspberryPi_Starter_Kit

Quickly help user develop a DevIot Gateway on RaspberryPi
Other
0 stars 0 forks source link

KeyError: "camera_r" #1

Open triggan opened 7 years ago

triggan commented 7 years ago

I'm attempting to run this on a Raspberry Pi 3 with Python 2.7.9 and I'm getting the following error. I find it strange that it references the RaspberryPi camera. Is that a requirement in order to run this demo?

pi@raspberrypi:~/Desktop/DevIoT_RaspberryPi_starter_kit $ sudo python app.py Traceback (most recent call last): File "app.py", line 15, in app = PiGateway(app_name, devIot_address, mqtt_address, devIot_account) File "build/bdist.linux-armv7l/egg/DevIoTGatewayPi/pigateway.py", line 17, in init File "build/bdist.linux-armv7l/egg/DevIoTGatewayPi/pigateway.py", line 84, in __import_sensor_model File "", line 1, in File "/home/pi/Desktop/DevIoT_RaspberryPi_starter_kit/sensors/camera.py", line 12, in path = config["sensors"]["camera_r"]['path'] KeyError: 'camera_r'

triggan commented 7 years ago

A quick update. I removed the camera.py sensor file from the sensors directory before running setup.py during the setup process and that seemed to fix my issue for now. I'm not currently using the RaspberryPi Camera for my current efforts.

tingxin commented 7 years ago

Hi Taylor, Thank you so much so good feedback, this issue caused by i use the cammera setting when import sensor models but in our config, there is no cammera. this is really a big bug. thank you so much, i will think it more how to make the logic more good.

Tingxin