ZeroDivisionError: web_server.py #12
Replies: 3 comments
-
Are you sure the device is still connected? Hard to know from the error message alone but sounds like you might not be getting data from the camera?
Am Mo., Juli 19, 2021 at 23:21 schrieb ***@***.***>:
Hi,
I'm having some issue running the web server version of the code.
It used to work partially (at least I have image off the web server); but after a reboot all I got was an error. Any help would be appreciated.
Traceback (most recent call last):
File "web_server.py", line 153, in
start_server()
File "web_server.py", line 134, in start_server
thermcam = pithermalcam(output_folder=output_folder)
File "/home/pi/PiThermalCam/pithermalcam/pi_therm_cam.py", line 48, in init
self._setup_therm_cam()
File "/home/pi/PiThermalCam/pithermalcam/pi_therm_cam.py", line 59, in _setup_therm_cam
self.mlx = adafruit_mlx90640.MLX90640(self.i2c) # begin MLX90640 with I2C comm
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_mlx90640.py", line 91, in init
self._ExtractParameters()
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_mlx90640.py", line 353, in _ExtractParameters
self._ExtractAlphaParameters()
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_mlx90640.py", line 539, in _ExtractAlphaParameters
alphaTemp[p] = SCALEALPHA / alphaTemp[p]
ZeroDivisionError: float division by zero
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi Tom,
Thanks for the quick reply. The device is connected and I can at least see
the power LED on, on the breakout board.
i2cdetect isn't quite showing what I'm expecting though; it was showing 33
only until after pip3 install pithermalcam
$ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f
30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f
40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f
50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f
70: 70 71 72 73 74 75 76 77
I will have to disclose that I'm running a Pi Zero W though. Although I
have had success initially until the first reboot.
Is there any util to test the data coming through the data / clock pin?
Cheers.
…On Tue, Jul 20, 2021 at 9:03 AM tomshaffner ***@***.***> wrote:
Are you sure the device is still connected? Hard to know from the error
message alone but sounds like you might not be getting data from the camera?
Am Mo., Juli 19, 2021 at 23:21 schrieb ***@***.***>:
Hi,
I'm having some issue running the web server version of the code.
It used to work partially (at least I have image off the web server); but
after a reboot all I got was an error. Any help would be appreciated.
Traceback (most recent call last):
File "web_server.py", line 153, in
start_server()
File "web_server.py", line 134, in start_server
thermcam = pithermalcam(output_folder=output_folder)
File "/home/pi/PiThermalCam/pithermalcam/pi_therm_cam.py", line 48, in init
self._setup_therm_cam()
File "/home/pi/PiThermalCam/pithermalcam/pi_therm_cam.py", line 59, in
_setup_therm_cam
self.mlx = adafruit_mlx90640.MLX90640(self.i2c) # begin MLX90640 with I2C
comm
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_mlx90640.py",
line 91, in init
self._ExtractParameters()
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_mlx90640.py",
line 353, in _ExtractParameters
self._ExtractAlphaParameters()
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_mlx90640.py",
line 539, in _ExtractAlphaParameters
alphaTemp[p] = SCALEALPHA / alphaTemp[p]
ZeroDivisionError: float division by zero
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AU47KEBUWUOKFFAT5ONMYYLTYVXZZANCNFSM5AU5AHGQ>
.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Yes, check the documentation page, it discusses ways to check the data is arriving.
Am Di., Juli 20, 2021 at 10:43 schrieb ***@***.***>:
Hi Tom,
Thanks for the quick reply. The device is connected and I can at least see
the power LED on, on the breakout board.
i2cdetect isn't quite showing what I'm expecting though; it was showing 33
only until after pip3 install pithermalcam
$ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f
30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f
40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f
50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f
70: 70 71 72 73 74 75 76 77
I will have to disclose that I'm running a Pi Zero W though. Although I
have had success initially until the first reboot.
Is there any util to test the data coming through the data / clock pin?
Cheers.
On Tue, Jul 20, 2021 at 9:03 AM tomshaffner ***@***.***> wrote:
Are you sure the device is still connected? Hard to know from the error
message alone but sounds like you might not be getting data from the camera?
Am Mo., Juli 19, 2021 at 23:21 schrieb ***@***.***>:
Hi,
I'm having some issue running the web server version of the code.
It used to work partially (at least I have image off the web server); but
after a reboot all I got was an error. Any help would be appreciated.
Traceback (most recent call last):
File "web_server.py", line 153, in
start_server()
File "web_server.py", line 134, in start_server
thermcam = pithermalcam(output_folder=output_folder)
File "/home/pi/PiThermalCam/pithermalcam/pi_therm_cam.py", line 48, in init
self._setup_therm_cam()
File "/home/pi/PiThermalCam/pithermalcam/pi_therm_cam.py", line 59, in
_setup_therm_cam
self.mlx = adafruit_mlx90640.MLX90640(self.i2c) # begin MLX90640 with I2C
comm
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_mlx90640.py",
line 91, in init
self._ExtractParameters()
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_mlx90640.py",
line 353, in _ExtractParameters
self._ExtractAlphaParameters()
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_mlx90640.py",
line 539, in _ExtractAlphaParameters
alphaTemp[p] = SCALEALPHA / alphaTemp[p]
ZeroDivisionError: float division by zero
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AU47KEBUWUOKFFAT5ONMYYLTYVXZZANCNFSM5AU5AHGQ>
.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
tomshaffner
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm having some issue running the web server version of the code.
It used to work partially (at least I have image off the web server); but after a reboot all I got was an error. Any help would be appreciated.
Traceback (most recent call last):
File "web_server.py", line 153, in
start_server()
File "web_server.py", line 134, in start_server
thermcam = pithermalcam(output_folder=output_folder)
File "/home/pi/PiThermalCam/pithermalcam/pi_therm_cam.py", line 48, in init
self._setup_therm_cam()
File "/home/pi/PiThermalCam/pithermalcam/pi_therm_cam.py", line 59, in _setup_therm_cam
self.mlx = adafruit_mlx90640.MLX90640(self.i2c) # begin MLX90640 with I2C comm
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_mlx90640.py", line 91, in init
self._ExtractParameters()
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_mlx90640.py", line 353, in _ExtractParameters
self._ExtractAlphaParameters()
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_mlx90640.py", line 539, in _ExtractAlphaParameters
alphaTemp[p] = SCALEALPHA / alphaTemp[p]
ZeroDivisionError: float division by zero
Beta Was this translation helpful? Give feedback.
All reactions