2016-04-29, 01:46
(2016-04-28, 14:01)maikito26 Wrote: @ogremalfeitor
It's an error in my code Sorry!
Update file: /resources/lib/ipcam_api_foscamhd.py
Line 808:
From:
super(FoscamCamera, self).init(camera_settings, daemon = False, verbose = True)
To:
super(FoscamCameraOverride, self).init(camera_settings, daemon = False, verbose = True)
Hi.
Thanks for the reply. Unfortunately, mostly the same error and seems it still was missing more changes. I looked at the code and although I don't really like python (unless it's Monty), I concluded it should be like this:
super(FoscamCameraOverride, self).__init__(camera_settings, daemon, verbose)
This way the "server" started, but when I tried to access the camera I got:
00:31:46 91026.109375 T:2857952176 ERROR: plugin.video.surveillanceroom v1.2.3: ### ERROR ### : Camera 1 :: Camera is not configured correctly
00:32:39 91078.421875 T:2857952176 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.TypeError'>
Error Contents: int() argument must be a string or a number, not 'NoneType'
Traceback (most recent call last):
File "/home/pi/.kodi/addons/plugin.video.surveillanceroom/default.py", line 318, in <module>
window = camerasettings.CameraSettingsWindow(camera_number)
File "/home/pi/.kodi/addons/plugin.video.surveillanceroom/resources/lib/camerasettings.py", line 175, in __init__
self.place_irconfig(0)
File "/home/pi/.kodi/addons/plugin.video.surveillanceroom/resources/lib/camerasettings.py", line 347, in place_irconfig
if int(self.camera.get_ir_config()[1].get('mode')) == 0:
TypeError: int() argument must be a string or a number, not 'NoneType'
-->End of Python script error report<--
Wondering if it was because I wasn't using the admin user but another username with less privileges, I changed to the admin user. But then:
00:35:50 91269.562500 T:2857952176 ERROR: Previous line repeats 1 times.
00:35:50 91269.562500 T:2857952176 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.KeyError'>
Error Contents: snapPicture2
Traceback (most recent call last):
File "/home/pi/.kodi/addons/plugin.video.surveillanceroom/default.py", line 272, in <module>
main_menu()
File "/home/pi/.kodi/addons/plugin.video.surveillanceroom/default.py", line 227, in main_menu
new_art_url = camera.getSnapShotUrl()
File "/home/pi/.kodi/addons/plugin.video.surveillanceroom/resources/lib/ipcam_api_wrapper.py", line 189, in getSnapShotUrl
return self.getStreamUrl(1, 1)
File "/home/pi/.kodi/addons/plugin.video.surveillanceroom/resources/lib/ipcam_api_wrapper.py", line 186, in getStreamUrl
return self.getUrl(source, stream_type)
File "/home/pi/.kodi/addons/plugin.video.surveillanceroom/resources/lib/ipcam_api_wrapper.py", line 165, in getUrl
return self.camera.snapshot_url
File "/home/pi/.kodi/addons/plugin.video.surveillanceroom/resources/lib/ipcam_api_foscamhd.py", line 834, in snapshot_url
_snapshotUrl = "http://{0}/cgi-bin/CGIProxy.fcgi?cmd={snapPicture2}&usr={1}&pwd={2}&".format(self.url, self.usr, self.pwd)
KeyError: snapPicture2
-->End of Python script error report<--
Anything I can do to help debug it?
Best regards and thanks in advance.