-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
errors out during weather request #1
Comments
I'm VERY new to Python, so to be honest I'm not sure what the '-m' does during an install. I'm pretty sure I installed feedparser by simply doing: "pip install feedparser" (But I suspect the install is not the cause of your problem.) Did you put apis.py and config.py in the same folder as the program? Did you modify config.py after you downloaded it? Can you see if the unmodified file works? I wrote Vectorator on a Windows 10 machine and haven't tested it on a Mac. The OS might have something to do with it, as well. I'll see what I can find out. |
Is there a preference for formatting the weather location in the cofig.py file? Here's the output from my terminal from the weather request: I've update the config.py to be: loc_city = "Paw Paw" loc_region = "MI" to see with this also causes a duplicate HTTP error 400 |
Yeah, I tried it out this morning and your city and state are definitely the cause of this problem. I'm using the free version of the open weather API: https://openweathermap.org/api and if you search for "Paw Paw" on their website it finds several city names in the US, but returns no results for "Paw Paw, Michigan". Strange. I may just have to catch the error and prompt people to pick a larger city in the area... |
I changed the location. to Kalamazoo US and vectorator properly queries the API. V3D9 has been running since this morning delivering weather information. |
Sometimes it will run for a while before it goes looking for weather data. I got the message about the "Paw Paw" error and changed the config file so it asks for Los Angeles rather than San Pedro. Still no joy. So I changed the location to Sacramento and that seemed to work so I think the URL parser is having trouble with spaces. Not sure if it is on the sending end or the receiving end. |
Running SDK 1.6 on MacOS 10.14.4
The feed parser command did not work so I changed it to:
python3 -m pip install feedparser
feedparser installed successfully
first run it errored after a few seconds:
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request
second run was longer but then:
File "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request
The text was updated successfully, but these errors were encountered: