|
Post by mikethechap on Apr 16, 2021 20:14:29 GMT -8
I'm getting an error making the camera work. I'm using the camera supplied by SDL and a Raspberry Pi 3B+.
As far as troubleshooting the issue myself:
- I've been looking around on the forums and saw that SDL had Dow create a file to help with logging: testLongSkyCamera.py. I've been running it and saw the following error, the same as I see when running the other SkyWeather main commands. I can't figure out the problem from the error code I see below;
- In the past, I had a TrueType issue that Jason helped solve.I confirmed that his fix is in the file. The error code still appears to complain about font related concerns;
- It doesn't show a picture on either WeatherStem or the Dash App.
Error code below:
pi@skyweather:~/SDL_Pi_Skyweather2 $ sudo python3 testLongSkyCamera.py ./SkyWeather2.JSON File exists config.STATIONKEY= OBSCURED taking SkyPicture -------------------- SkyCam Picture Taken -------------------- Traceback (most recent call last): File "/home/pi/SDL_Pi_Skyweather2/SkyCamera.py", line 52, in takeSkyPicture font = ImageFont.truetype("/usr/share/fonts/truetype/freefont/FreeSans.ttf", 25) File "/usr/lib/python3/dist-packages/PIL/ImageFont.py", line 280, in truetype return FreeTypeFont(font, size, index, encoding, layout_engine) File "/usr/lib/python3/dist-packages/PIL/ImageFont.py", line 145, in __init__ layout_engine=layout_engine) OSError: cannot open resource
-------------------- SkyCam Picture Failed -------------------- -------------------- SkyCam Package Sending -------------------- API Key: OBSCURED ------->Sea Level 0.0 The pastebin URL is (r.text):{"error":"Invalid Device Key"} sending SkyCamera -------------------- SkyCam Package Sending -------------------- API Key: Obscured ------->Sea Level 0.0 The pastebin URL is (r.text):{"error":"Invalid Device Key"} taking SkyPicture -------------------- SkyCam Picture Taken -------------------- Traceback (most recent call last): File "/home/pi/SDL_Pi_Skyweather2/SkyCamera.py", line 52, in takeSkyPicture font = ImageFont.truetype("/usr/share/fonts/truetype/freefont/FreeSans.ttf", 25) File "/usr/lib/python3/dist-packages/PIL/ImageFont.py", line 280, in truetype return FreeTypeFont(font, size, index, encoding, layout_engine) File "/usr/lib/python3/dist-packages/PIL/ImageFont.py", line 145, in __init__ layout_engine=layout_engine) OSError: cannot open resource
-------------------- SkyCam Picture Failed Full disclosure: I was running this on another SD card that died. I ran my setup on the SwitchDoc card but had a lot of difficulty configuring it (in spite of the instructions) so gave up and used Sopwth's instructions.
|
|
|
Post by mikethechap on Apr 17, 2021 6:30:16 GMT -8
Okay. So, part of this is solved. I had to install the FreeSans font. This should be updated in the various documentations.
Now, I'm getting the Invalid Device Key error. After that, I think we're in a better place.
|
|
|
Post by SDL on Apr 17, 2021 8:14:39 GMT -8
Progress.
For some reason, the Raspberry Pi Foundation keeps changing fonts that are installed.
When you said you had problems configuring the SDL SD card, would you please elaborate? If we have a problem, we want to fix it!
BP
|
|
|
Post by mikethechap on Apr 18, 2021 16:47:46 GMT -8
First, another note: I'm still getting an Invalid Device Key error.
The problem with the SD card were several. Honestly, I don't remember them. One I do remember was Step 6 on the instructions:
cd /home/pi/SDL_Pi_SkyWeather2
sudo python3 testWeatherSensors.py The problem is that there's no file by that name. Perhaps testWitelessSensors.py was intended? I want to make sure to go step by step so I don't have to redo anything.
There were other dependencies that were missing, as well. Likely one was the TrueType font I mentioned earlier.
You've mentioned before that these manuals are a ton of work. Certainly, with changes in dependencies and changes made by the Raspberry Pi folks, it's really hard. I don't know what the best approach is to the guides, but for those of us further behind on the learning curve, they are indispensable. Maybe adding a wiki where people can make some slight edits to the guide would ease things for you, get updates into place sooner, and build confidence in the build process? I know that I've made some updates to Wikipedia. While I can see my edits right away, they are still seen and finally approved by someone higher up on the food chain.
|
|
|
Post by SDL on Apr 20, 2021 7:57:17 GMT -8
|
|
|
Post by mikethechap on Apr 23, 2021 10:14:36 GMT -8
Thanks so much for the updated links to the instructional docs. I'll PM my DeviceID.
|
|
|
Post by SDL on Apr 23, 2021 11:31:52 GMT -8
Please post the results from sudo python3 testWeatherSensors.py
Please!
BP
|
|
|
Post by mikethechap on Apr 23, 2021 13:07:32 GMT -8
Within the folder SDL_Pi_Skyweather2, I ran the command: sudo python3 testWeatherSensors.py Here's the response:
python3: can't open file 'testWeatherSensors.py': [Errno 2] No such file or directory
As I say, in the SDL_Pi_Skyweather2 folder, there is no file by the name testWeatherSensors.py
The closest one I can find is TestWirelessSensors.py
I hope this helps!
Mike
|
|
dow4hurst
Full Member
SkyWeather2 Newbie
Posts: 117
|
Post by dow4hurst on Apr 23, 2021 13:41:13 GMT -8
Mike, Here is a listing of available test scripts in the 025 version of a clean git pull for SkyWeather2. I just updated to version 25 today.
pi@SwitchDocLabs:~/SDL_Pi_SkyWeather2 $ ls -l ./test* -rw-r--r-- 1 pi pi 674 Apr 23 15:21 ./testBMP280.py -rw-r--r-- 1 pi pi 1208 Apr 23 15:21 ./testDustHM3301.py -rw-r--r-- 1 pi pi 468 Apr 23 15:21 ./testSkyCamera.py -rw-r--r-- 1 pi pi 3311 Apr 23 15:21 ./testWirelessSensors.py
so, run the testWirelessSensors.py script.
cd ~/SDL_Pi_SkyWeather2 sudo python3 ./testWirelessSensors.py
Hope this helps, Dow
|
|
|
Post by SDL on Apr 23, 2021 13:53:44 GMT -8
Phhhtttt. Dow4hurst is correct. I need to go for a run to clear my brain.
I meant:
cd ~/SDL_Pi_SkyWeather2 sudo python3 ./testWirelessSensors.py
|
|
|
Post by mikethechap on Apr 23, 2021 17:16:28 GMT -8
I've been working in healthcare the past year. Trust me: I get it. I do this to clear my brain... what's left of it.
Thanks Dow4hurst!
|
|
|
Post by mikethechap on Apr 29, 2021 19:03:18 GMT -8
Hi, JOhn.
I PM'd my device ID last week per your request.
Thanks,
Mike D.
|
|
|
Post by SDL on May 1, 2021 17:07:49 GMT -8
Did John send you one?
BP
|
|
|
Post by mikethechap on May 8, 2021 5:42:33 GMT -8
No.
|
|
|
Post by SDL on May 8, 2021 7:34:05 GMT -8
|
|