johnwargo / pi-weather-station

Raspberry Pi Sense HAT, Weather Underground station
MIT License
64 stars 25 forks source link

Errror when uploading to Weather Underground - Exception: <class 'urllib2.HTTPError'> #4

Closed TravisMX closed 5 years ago

TravisMX commented 5 years ago

I downloaded the NOOBs package, selected Raspin as my OS and have performed all the updates.

After having issues with the Sense Hat not working, the script now runs but when it comes to uploading results to Weather Underground, I get the following error in the terminal

5 minute mark (25 @ 2019-08-31 13:25:00.852708)

Uploading data to Weather Underground

Exception: <class 'urllib2.HTTPError'>

The fault/error message isn't overly helpful to a non coder, so I'm not sure what the issue might be. The station id and key have been triple checked in the config file.

Any ideas?

johnwargo commented 5 years ago

I really can't think of anything, that error message doesn't tell me much about what's going on. It's been years since I looked at this code, but it only uses HTTP once, and that's when uploading code. I wonder is urllib2 isn't loaded and that's why it's failing. A quick search brought me to this: https://www.raspberrypi.org/forums/viewtopic.php?t=156726#p1022318.

TravisMX commented 5 years ago

I'm not a coder, so forgive my ignorance here -

Is it a matter of using the urllib3 library file instead? Will updating line 19 and 218 to reference this assist?

Appreciate the reply.

johnwargo commented 5 years ago

Good question, I’m not sure. Since they’re major version different, it may be that the api signature changed and it won’t work. Try it, see what happens.

Normally I’d offer to setup a device and test it out, but I’m knee deep writing my next book and won’t have time till late this month. If you can wait, ping me in a few weeks.

John M. Wargo

On Sep 3, 2019, at 7:22 AM, TravisMX notifications@github.com wrote:

I'm not a coder, so forgive my ignorance here -

Is it a matter of using the urllib3 library file instead? Will updating line 19 and 218 to reference this assist?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

johnwargo commented 5 years ago

Did it work?  Let me know and I may have some time to look at this next week (I finished my  book).

On 9/3/2019 4:11 PM, John M. Wargo wrote:

Good question, I’m not sure.  Since they’re major version different, it may be that the api signature changed and it won’t work.  Try it, see what happens.

Normally I’d offer to setup a device and test it out, but I’m knee deep writing my next book and won’t have time till late this month. If you can wait, ping me in a few weeks.

John M. Wargo

On Sep 3, 2019, at 7:22 AM, TravisMX <notifications@github.com mailto:notifications@github.com> wrote:

I'm not a coder, so forgive my ignorance here -

Is it a matter of using the urllib3 library file instead? Will updating line 19 and 218 to reference this assist?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/johnwargo/pi_weather_station/issues/4?email_source=notifications&email_token=AAELQR6RA2HNGB3SX4PZ2BLQHZCHVA5CNFSM4ISSZDDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5X34TY#issuecomment-527416911, or mute the thread https://github.com/notifications/unsubscribe-auth/AAELQRYUZUFKLQ7M2NAY7F3QHZCHVANCNFSM4ISSZDDA.

-- John M. Wargo Office: 704.321.0265 Web: www.johnwargo.com http://www.johnwargo.com Twitter: @johnwargo https://twitter.com/johnwargo

TravisMX commented 5 years ago

Hi John,

It didn't work. Would appreciate you having a look. Although there are other sets of code out there for the weather station, yours seems to be the most accurate by far.

On Thu, 26 Sep 2019 at 07:06, John M. Wargo notifications@github.com wrote:

Did it work? Let me know and I may have some time to look at this next week (I finished my book).

On 9/3/2019 4:11 PM, John M. Wargo wrote:

Good question, I’m not sure. Since they’re major version different, it may be that the api signature changed and it won’t work. Try it, see what happens.

Normally I’d offer to setup a device and test it out, but I’m knee deep writing my next book and won’t have time till late this month. If you can wait, ping me in a few weeks.

John M. Wargo

On Sep 3, 2019, at 7:22 AM, TravisMX <notifications@github.com <mailto: notifications@github.com>> wrote:

I'm not a coder, so forgive my ignorance here -

Is it a matter of using the urllib3 library file instead? Will updating line 19 and 218 to reference this assist?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/johnwargo/pi_weather_station/issues/4?email_source=notifications&email_token=AAELQR6RA2HNGB3SX4PZ2BLQHZCHVA5CNFSM4ISSZDDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5X34TY#issuecomment-527416911>, or mute the thread < https://github.com/notifications/unsubscribe-auth/AAELQRYUZUFKLQ7M2NAY7F3QHZCHVANCNFSM4ISSZDDA .

-- John M. Wargo Office: 704.321.0265 Web: www.johnwargo.com http://www.johnwargo.com Twitter: @johnwargo https://twitter.com/johnwargo

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/johnwargo/pi_weather_station/issues/4?email_source=notifications&email_token=ANBTFUP4JDEFM5RTMMAECGTQLPKVNA5CNFSM4ISSZDDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7TPXNI#issuecomment-535231413, or mute the thread https://github.com/notifications/unsubscribe-auth/ANBTFUKGVMPA7S4BZSG3VIDQLPKVNANCNFSM4ISSZDDA .

johnwargo commented 5 years ago

@TravisMX I just setup my device, followed the instructions in the project's readme file and started it up and I didn't get any errors. I never tried the noob approach, why not download the full raspbian buster image and try it there? That's all I ever used: the full raspbian image.

johnwargo commented 5 years ago

@TravisMX Noticed one typo in the file:

@lxterminal -e /home/pi/pi_weather/start-station.sh

should actually be:

@lxterminal -e /home/pi/pi_weather_station/start-station.sh

That shouldn't be the source of your problem though.

johnwargo commented 5 years ago

@TravisMX I'm happy to help but you need to respond (or close the issue). I setup the hardware and got it to work using the instructions in the article. Need some additional information from you. What device? Did you try the full raspbian image? What else have you done.

TravisMX commented 5 years ago

Sorry for the delay, I'm interstate. I'll close the issue and try the raspbian image. If I have issues I'll PM you