o355 / pyweather Goto Github PK
View Code? Open in Web Editor NEWViewing the weather in a CLI has never been this much fun. (ARCHIVED)
Home Page: https://gitlab.com/o355/PyWeather
License: GNU General Public License v3.0
Viewing the weather in a CLI has never been this much fun. (ARCHIVED)
Home Page: https://gitlab.com/o355/PyWeather
License: GNU General Public License v3.0
I'll need to add an asciinema demonstration to the readme at some point. Tried doing it before, but I made a few mistakes.
Bugs bugs bugs. Here as a reminder, but right now, LA shows the wind direction as "Variable".
I'll add a catch to 0.6.1 beta code that will change the text to "Wind: x mph (x kph), blowing in variable directions".
Description: Adding the ability to verify favorite locations, adding additional support for proper data gathering for new airport data, and adding support for airport locations.
Checklist:
Estimated completion: January 29, 2018
At this point we need to try and use secure APIs. PyWeather by default isn't using HTTPS.
EDIT: We will not test machines if they're HTTPS compatible or not, but instead catch if a SSL exception occurs.
Things to do:
Well that's nice!
Wunderground says I need attribution.
Checklist:
Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
=============== RESTART: C:\Users\Benjamin\PyWeather\setup.py ===============
Your config likely isn't provisioned. Would you like to provision your config?
It's highly recommended you provision your config. If you decide not to,
you may run into issues using PyWeather.
Yes or No.
Input here: ywa
Couldn't understand your input. By default, I'm going to provision
your config. Beginning now...
Config file provisioned successfully! Moving on with PyWeather setup...
Welcome to PyWeather setup.
This is meant to run as a one-time program, when you first get PyWeather.
Running a few checks...
Before we get started, I want to confirm some permissions from you.
Is it okay if I use 1-5 MB of data (downloading libraries), save a small
text file called apikey.txt (> 2 KB), and automatically install Python
libraries?
Please input yes or no below:
Input here: yes
Cool! Let's start.
I'm going to start by checking for necessary libraries (to run PyWeather).
This can take a moment, so please hold tight while I check!
Deleting the PIP installer file (if it exists)
The file get-pip.py didn't exist, or we had wrong permissions.
All done!
Shucks. Not all necessary libraries are installed. Here's what needs to be installed:
�[K 12% |### | 10kB 10.2MB/s eta 0:00:01
�[K 24% |####### | 20kB 525kB/s eta 0:00:01
�[K 37% |########### | 30kB 682kB/s eta 0:00:01
�[K 49% |############### | 40kB 772kB/s eta 0:00:01
�[K 62% |################### | 51kB 825kB/s eta 0:00:01
�[K 74% |####################### | 61kB 841kB/s eta 0:00:01
�[K 87% |########################### | 71kB 843kB/s eta 0:00:01
�[K 99% |############################### | 81kB 827kB/s eta 0:00:01
�[K 100% |################################| 92kB 708kB/s
Collecting requests (from geocoder)
Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)
�[K 11% |### | 10kB ...
�[K 23% |####### | 20kB 4.1MB/s eta 0:00:01
�[K 34% |########### | 30kB 2.8MB/s eta 0:00:01
�[K 46% |############## | 40kB 2.0MB/s eta 0:00:01
�[K 57% |################## | 51kB 1.7MB/s eta 0:00:01
�[K 69% |###################### | 61kB 1.5MB/s eta 0:00:01
�[K 80% |######################### | 71kB 1.3MB/s eta 0:00:01
�[K 92% |############################# | 81kB 1.2MB/s eta 0:00:01
�[K 100% |################################| 92kB 940kB/s
Collecting ratelim (from geocoder)
Downloading ratelim-0.1.6-py2.py3-none-any.whl
Collecting click (from geocoder)
Downloading click-6.7-py2.py3-none-any.whl (71kB)
�[K 14% |#### | 10kB ...
�[K 28% |######### | 20kB 5.1MB/s eta 0:00:01
�[K 43% |############# | 30kB 2.6MB/s eta 0:00:01
�[K 57% |################## | 40kB 2.0MB/s eta 0:00:01
�[K 71% |####################### | 51kB 1.7MB/s eta 0:00:01
�[K 86% |########################### | 61kB 1.5MB/s eta 0:00:01
�[K 100% |################################| 71kB 1.0MB/s
Collecting six (from geocoder)
Downloading six-1.10.0-py2.py3-none-any.whl
Collecting urllib3<1.23,>=1.21.1 (from requests->geocoder)
Downloading urllib3-1.22-py2.py3-none-any.whl (132kB)
�[K 7% |## | 10kB ...
�[K 15% |#### | 20kB 5.1MB/s eta 0:00:01
�[K 23% |####### | 30kB 2.8MB/s eta 0:00:01
�[K 30% |######### | 40kB 2.0MB/s eta 0:00:01
�[K 38% |############ | 51kB 1.6MB/s eta 0:00:01
�[K 46% |############## | 61kB 1.4MB/s eta 0:00:01
�[K 54% |################# | 71kB 1.2MB/s eta 0:00:01
�[K 61% |################### | 81kB 1.1MB/s eta 0:00:01
�[K 69% |###################### | 92kB 1.1MB/s eta 0:00:01
�[K 77% |######################## | 102kB 994kB/s eta 0:00:01
�[K 85% |########################### | 112kB 839kB/s eta 0:00:01
�[K 92% |############################# | 122kB 736kB/s eta 0:00:01
�[K 100% |################################| 133kB 585kB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests->geocoder)
Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB)
�[K 7% |## | 10kB 5.1MB/s eta 0:00:01
�[K 15% |#### | 20kB 3.4MB/s eta 0:00:01
�[K 23% |####### | 30kB 2.0MB/s eta 0:00:01
�[K 30% |######### | 40kB 1.7MB/s eta 0:00:01
�[K 38% |############ | 51kB 1.4MB/s eta 0:00:01
�[K 46% |############## | 61kB 1.3MB/s eta 0:00:01
�[K 53% |################# | 71kB 1.1MB/s eta 0:00:01
�[K 61% |################### | 81kB 1.0MB/s eta 0:00:01
�[K 69% |###################### | 92kB 940kB/s eta 0:00:01
�[K 76% |######################## | 102kB 906kB/s eta 0:00:01
�[K 84% |########################### | 112kB 781kB/s eta 0:00:01
�[K 92% |############################# | 122kB 691kB/s eta 0:00:01
�[K 99% |############################### | 133kB 632kB/s eta 0:00:01
�[K 100% |################################| 143kB 519kB/s
Collecting idna<2.7,>=2.5 (from requests->geocoder)
Downloading idna-2.6-py2.py3-none-any.whl (56kB)
�[K 18% |##### | 10kB ...
�[K 36% |########### | 20kB 5.1MB/s eta 0:00:01
�[K 54% |################# | 30kB 2.6MB/s eta 0:00:01
�[K 72% |####################### | 40kB 2.0MB/s eta 0:00:01
�[K 90% |############################# | 51kB 1.6MB/s eta 0:00:01
�[K 100% |################################| 61kB 1.0MB/s
Collecting certifi>=2017.4.17 (from requests->geocoder)
Downloading certifi-2017.7.27.1-py2.py3-none-any.whl (349kB)
�[K 2% | | 10kB 10.2MB/s eta 0:00:01
�[K 5% |# | 20kB 4.1MB/s eta 0:00:01
�[K 8% |## | 30kB 2.2MB/s eta 0:00:01
�[K 11% |### | 40kB 1.6MB/s eta 0:00:01
�[K 14% |#### | 51kB 1.3MB/s eta 0:00:01
�[K 17% |##### | 61kB 1.2MB/s eta 0:00:01
�[K 20% |###### | 71kB 1.1MB/s eta 0:00:01
�[K 23% |####### | 81kB 1.0MB/s eta 0:00:01
�[K 26% |######## | 92kB 930kB/s eta 0:00:01
�[K 29% |######### | 102kB 882kB/s eta 0:00:01
�[K 32% |########## | 112kB 752kB/s eta 0:00:01
�[K 35% |########### | 122kB 664kB/s eta 0:00:01
�[K 38% |############ | 133kB 609kB/s eta 0:00:01
�[K 41% |############# | 143kB 556kB/s eta 0:00:01
�[K 43% |############## | 153kB 514kB/s eta 0:00:01
�[K 46% |############## | 163kB 476kB/s eta 0:00:01
�[K 49% |############### | 174kB 447kB/s eta 0:00:01
�[K 52% |################ | 184kB 423kB/s eta 0:00:01
�[K 55% |################# | 194kB 399kB/s eta 0:00:01
�[K 58% |################## | 204kB 383kB/s eta 0:00:01
�[K 61% |################### | 215kB 364kB/s eta 0:00:01
�[K 64% |#################### | 225kB 344kB/s eta 0:00:01
�[K 67% |##################### | 235kB 328kB/s eta 0:00:01
�[K 70% |###################### | 245kB 313kB/s eta 0:00:01
�[K 73% |####################### | 256kB 293kB/s eta 0:00:01
�[K 76% |######################## | 266kB 279kB/s eta 0:00:01
�[K 79% |######################### | 276kB 265kB/s eta 0:00:01
�[K 82% |########################## | 286kB 252kB/s eta 0:00:01
�[K 84% |########################### | 296kB 240kB/s eta 0:00:01
�[K 87% |############################ | 307kB 230kB/s eta 0:00:01
�[K 90% |############################# | 317kB 220kB/s eta 0:00:01
�[K 93% |############################# | 327kB 212kB/s eta 0:00:01
�[K 96% |############################## | 337kB 204kB/s eta 0:00:01
�[K 99% |############################### | 348kB 198kB/s eta 0:00:01
�[K 100% |################################| 358kB 179kB/s
Collecting decorator (from ratelim->geocoder)
Downloading decorator-4.1.2-py2.py3-none-any.whl
Installing collected packages: urllib3, chardet, idna, certifi, requests, decorator, ratelim, click, six, geocoder
Successfully installed certifi-2017.7.27.1 chardet-3.0.4 click-6.7 decorator-4.1.2 geocoder-1.29.1 idna-2.6 ratelim-0.1.6 requests-2.18.4 six-1.10.0 urllib3-1.22
Installing appJar...
Collecting appJar
Downloading appJar-0.070.tar.gz (500kB)
�[K 2% | | 10kB ...
�[K 4% |# | 20kB 1.5MB/s eta 0:00:01
�[K 6% |# | 30kB 1.1MB/s eta 0:00:01
�[K 8% |## | 40kB 853kB/s eta 0:00:01
�[K 10% |### | 51kB 787kB/s eta 0:00:01
�[K 12% |### | 61kB 830kB/s eta 0:00:01
�[K 14% |#### | 71kB 770kB/s eta 0:00:01
�[K 16% |##### | 81kB 787kB/s eta 0:00:01
�[K 18% |##### | 92kB 737kB/s eta 0:00:01
�[K 20% |###### | 102kB 741kB/s eta 0:00:01
�[K 22% |####### | 112kB 635kB/s eta 0:00:01
�[K 24% |####### | 122kB 628kB/s eta 0:00:01
�[K 26% |######## | 133kB 609kB/s eta 0:00:01
�[K 28% |######### | 143kB 613kB/s eta 0:00:01
�[K 30% |######### | 153kB 595kB/s eta 0:00:01
�[K 32% |########## | 163kB 550kB/s eta 0:00:01
�[K 34% |########### | 174kB 541kB/s eta 0:00:01
�[K 36% |########### | 184kB 499kB/s eta 0:00:01
�[K 38% |############ | 194kB 494kB/s eta 0:00:01
�[K 40% |############# | 204kB 459kB/s eta 0:00:01
�[K 42% |############# | 215kB 461kB/s eta 0:00:01
�[K 45% |############## | 225kB 433kB/s eta 0:00:01
�[K 47% |############### | 235kB 419kB/s eta 0:00:01
�[K 49% |############### | 245kB 390kB/s eta 0:00:01
�[K 51% |################ | 256kB 370kB/s eta 0:00:01
�[K 53% |################# | 266kB 356kB/s eta 0:00:01
�[K 55% |################# | 276kB 335kB/s eta 0:00:01
�[K 57% |################## | 286kB 327kB/s eta 0:00:01
�[K 59% |################## | 296kB 309kB/s eta 0:00:01
�[K 61% |################### | 307kB 302kB/s eta 0:00:01
�[K 63% |#################### | 317kB 283kB/s eta 0:00:01
�[K 65% |#################### | 327kB 275kB/s eta 0:00:01
�[K 67% |##################### | 337kB 261kB/s eta 0:00:01
�[K 69% |###################### | 348kB 252kB/s eta 0:00:01
�[K 71% |###################### | 358kB 248kB/s eta 0:00:01
�[K 73% |####################### | 368kB 237kB/s eta 0:00:01
�[K 75% |######################## | 378kB 232kB/s eta 0:00:01
�[K 77% |######################## | 389kB 221kB/s eta 0:00:01
�[K 79% |######################### | 399kB 217kB/s eta 0:00:01
�[K 81% |########################## | 409kB 208kB/s eta 0:00:01
�[K 83% |########################## | 419kB 204kB/s eta 0:00:01
�[K 85% |########################### | 430kB 196kB/s eta 0:00:01
�[K 87% |############################ | 440kB 194kB/s eta 0:00:01
�[K 90% |############################ | 450kB 188kB/s eta 0:00:01
�[K 92% |############################# | 460kB 180kB/s eta 0:00:01
�[K 94% |############################## | 471kB 178kB/s eta 0:00:01
�[K 96% |############################## | 481kB 171kB/s eta 0:00:01
�[K 98% |############################### | 491kB 170kB/s eta 0:00:01
�[K 100% |################################| 501kB 149kB/s
�[31mException:
Traceback (most recent call last):
File "C:\Users\Benjamin\AppData\Local\Programs\Python\Python36\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Users\Benjamin\AppData\Local\Programs\Python\Python36\lib\site-packages\pip\commands\install.py", line 324, in run
requirement_set.prepare_files(finder)
File "C:\Users\Benjamin\AppData\Local\Programs\Python\Python36\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "C:\Users\Benjamin\AppData\Local\Programs\Python\Python36\lib\site-packages\pip\req\req_set.py", line 634, in prepare_file
abstract_dist.prep_for_dist()
File "C:\Users\Benjamin\AppData\Local\Programs\Python\Python36\lib\site-packages\pip\req\req_set.py", line 129, in prep_for_dist
self.req_to_install.run_egg_info()
File "C:\Users\Benjamin\AppData\Local\Programs\Python\Python36\lib\site-packages\pip\req\req_install.py", line 439, in run_egg_info
command_desc='python setup.py egg_info')
File "C:\Users\Benjamin\AppData\Local\Programs\Python\Python36\lib\site-packages\pip\utils_init.py", line 676, in call_subprocess
line = console_to_str(proc.stdout.readline())
File "C:\Users\Benjamin\AppData\Local\Programs\Python\Python36\lib\site-packages\pip\compat_init_.py", line 73, in console_to_str
return s.decode(sys.stdout.encoding)
AttributeError: 'NoneType' object has no attribute 'encoding'�[0m
Installing requests...
Requirement already satisfied: requests in c:\users\benjamin\appdata\local\programs\python\python36\lib\site-packages
Requirement already satisfied: urllib3<1.23,>=1.21.1 in c:\users\benjamin\appdata\local\programs\python\python36\lib\site-packages (from requests)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\users\benjamin\appdata\local\programs\python\python36\lib\site-packages (from requests)
Requirement already satisfied: idna<2.7,>=2.5 in c:\users\benjamin\appdata\local\programs\python\python36\lib\site-packages (from requests)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\benjamin\appdata\local\programs\python\python36\lib\site-packages (from requests)
Sweet! All libraries should be installed.
Just to confirm, I'm double checking if needed libraries are installed.
Hmm...geopy didn't install properly.
As a last resort, we can use sudo -H to install packages.
Do you want to use the shell option to install geopy?
WARNING: Using the last-resort method may screw up PIP, and
may require you to reinstall PIP on your machine.Yes or No.
Input here: no
Not installing geopy with a shell command.
Cannot continue without geopy.
Press enter to exit.
Sudo is not available on Windows, so that won't work.
Wunderground (for some reason) tends to duplicate hurricane data. I submitted a ticket about this months ago but no response.
Because no one ever maintains their API, now I'm responsible for fixing it. It'll be fixed by storing the storm name in a dictionary that gets cleared every time you boot up hurricane data. When each storm is iterated over, the name is stored in the dictionary.
For every iteration we go into a for loop seeing if the hurricane name matches an entry in the dictionary. If it's a match, iterate on.
Checklist:
Description: Users can change the radar image size from inside the radar GUI through a settings window.
Checklist:
Estimated completion time: January 29, 2017
Completely refactoring configupdate.py using the "onion" method is something I'd like to do for 0.6.4 beta or 0.6.5 beta.
Instead of the current, redundant method, config changes would be applied based on which version you run on. Code snippet:
if version = 0.6.3 beta
config['FOO']['BAR'] = "2"
if version = 0.6.2 beta
config['FOO']['BAR'] = "1"
Along with this a new system for printing new config changes will also be implemented (2 lines, separated, input to view)
Lowering default data iterations in PyWeather for better readability. Before this gets started I will do a very conclusive study about how much data different terminals on different screens can render.
After that I'll decide on an iteration count that works well. Right now, the 5+ iteration method is only good for full-screen terminals.
To-do list:
Exactly what the title says.
I fixed it :D
How do I add my fixes to PyWeather?
Right now the system for showing errors for config errors sucks.
A new system would try each individual variable, and output to the user what config options are missing. This would also allow for multiple config errors to occur.
Description: On my KDE neon-based laptop, I had to install python3-tk to make the GUI work even though I had a GUI.
I'm thinking about fixing this by checking for an exact exception description, and then recommending to the user that they'll need to install python3-tk.
This error occurs when trying to view detailed sun/moon data in New York, NY.
Occurs 100% of the time (when reproduced twice)
OS is Kubuntu 16.10, Python 3.5.2 (yo Kubuntu, I hear you need an upgrade for yo Python, so...idk)
Output of the script:
Traceback (most recent call last):
File "pyweather.py", line 1021, in
if MS_data == True:
NameError: name 'MS_data' is not defined
A possible fix:
On Line 1014, in the try function, MS_data isn't getting defined. Since there is moonset data, the variable isn't getting defined.
This magically became the example issue
No one likes overflowing lines, so why not shorten sentences down (or add more lines) because readability is sort of important.
Please note that developers are not UI designers.
Checklist:
Description: When I opened the GUI on my KDE neon laptop, everything worked, but on close this error occurred:
Exception ignored in: <bound method Image.__del__ of <tkinter.PhotoImage object at 0x7f19d9d90400>>
Traceback (most recent call last):
File "/usr/lib/python3.5/tkinter/__init__.py", line 3360, in __del__
TypeError: catching classes that do not inherit from BaseException is not allowed
I'll have to figure this out and see how to properly not display this (it's on close anyways)
Just noticed this when trying to run setup.py in hopes of fixing another issue.
The message will be changed to reflect that you were trying to delete a non-existent favloc
The versioninfo file fails to load, and is improperly caught. This error can also occur when your version info file is missing.
Checklist:
Description: Adding previous locations (off by default) to automatically store the last 5 locations that were queried.
Things to determine: When querying a favorite location, do we store the favorite location variable OR do we store the location.
Checklist:
Estimated completion time: January 12, 2017
Where would you want me to backup the key to?
This is a directory. If I wanted my key at directory/backkey.txt,
You would enter 'directory'. The default directory is 'backup'.
Input here:
I pushed enter, expecting pyweather to automatically create and use the directory 'backup.'
Instead, I got this:
Creating a backup...
Couldn't make the directory, does it exist?
Traceback (most recent call last):
File "setup.py", line 846, in
open(folder_argument, 'w').close()
PermissionError: [Errno 13] Permission denied: '//backkey.txt'
I think the program should create the backup directory if no name is provided, something like:
def mkdir(directory):
if not os.path.exists(directory):
os.makedirs(directory)
So, I was looking through the code to fix the "rounding on termux" bug, and I noticed that when the update check fails, it doesn't go ahead and try to get the weather. Instead, it exits. I feel like it should at least try to get the weather before quitting (HINT HINT my project keeps going even when it fails :)
If the weather check fails, it should show the cached data as long as it isn't out of date (the data, not PyWeather.)
Anyway, that's what I think. I would do it myself, but I don't feel like it (OK OK I will :P)
Configsetup.py needs to get enhanced to have geocoder detection code, but also allowing to maintain compatibility to launch without any additional libraries.
The new code would try to import geopy, and if it isn't found suggest installing geopy for functionality of the geocoder (at the end of the script). The user doesn't have to install geopy and can still default to an http scheme for the geocoder.
If the user already has geopy or wants to install it then we can run the geocoder scheme detection.
The PyWeather updater system sucks at the moment, and I'm going to change this in 0.6.4 beta.
Right now, the PyWeather updater uses Git to update, which has been notoriously unreliable across a half a dozen releases. Git only works on some platforms, and I'm sick of the updater breaking on each release.
Beginning with 0.6.3 beta, the Git updater will be entirely disabled, and I feel as if coding in a new updater will extend 0.6.3 beta's release time out too far into December 2017. A few configuration options will get removed as well.
From 0.6.3 beta to 0.6.4 beta, the .zip method will be the only way of downloading PyWeather within itself.
The new updater will encompass a few new tricks that I still need to learn, and here's how things will generally work:
With this, I need to learn these skills:
Part 1 involves gutting the current git updater out of the 0.6.3 beta code, as I don't have the time to make the updater before the deadline of November 30 rolls around.
More bugs. I need to start rounding a lot of variables down to 1 or 2 places. Sad part, this is a large thing to do. Planning for a 0.6.1 beta release, but it could get pushed to 0.6.2.
So I checked the previous day's weather in New York, using the hourly view. This error decided to show up:
File "pyweather.py", line 1498, in <module>
if yesterday_totalloops == yesterday_hourlyLoops:
NameError: name 'yesterday_hourlyLoops' is not defined.
I'll fix this myself, I'd imagine it's fairly easy to do so, this issue was only made so that I can practice using issues since I rarely do so.
The PyWeather updater system sucks at the moment, and I'm going to change this in 0.6.4 beta.
Right now, the PyWeather updater uses Git to update, which has been notoriously unreliable across a half a dozen releases. Git only works on some platforms, and I'm sick of the updater breaking on each release.
Beginning with 0.6.3 beta, the Git updater will be entirely disabled, and I feel as if coding in a new updater will extend 0.6.3 beta's release time out too far into December 2017. A few configuration options will get removed as well.
From 0.6.3 beta to 0.6.4 beta, the .zip method will be the only way of downloading PyWeather within itself.
The new updater will encompass a few new tricks that I still need to learn, and here's how things will generally work:
With this, I need to learn these skills:
Part 2 involves adding the actual updater code itself into 0.6.4 beta.
Checklist:
Because it is a nightmare. I'm working on improving the code to exit at the summary screen (same goes for yesterday's weather if I'm correct).
title
Description: Fixing historical weather code to allow PWSes to do historical lookups.
Checklist:
Estimated completion date: January 19, 2017
This isn't really an issue more than an FYI
I made this beautiful work of art (still waiting for Wunderground to get back to me about using it):
Here are the list of bugs that need to get fixed in 0.3.3 (from extensive testing of 0.3.2):
Location input: "South Pole"
PyWeather crashes and now the penguins in the south pole are sad since they can't see the weather
Hi! Thanks for your interest in contributing to PyWeather, by reporting an issue.
It's simply impossible for me to catch every bug in PyWeather, so you can help! Before you report an issue, run down this to-do list.
Reporting indev code:
In the end, if you're unsure about the requirements above, report the issue anyways.
Done with the list? Here's what you'll need for a report.
python3
or python
, and copying the first two lines outputted. For your OS, a description like Windows 10
, or Ubuntu 16.04
works.123 5th Avenue, New York, NY
, try to generalize the location to New York, NY
.You can go the extra mile by adding this stuff to your report.
More details on reporting an issue can be found in the .github folder, in the document called CONTRIBUTING.md
. If you're still confused
If you'd like to keep this template in your report, that's completely fine. Otherwise, report the issue!
When attempting to load your configuration file, an error
occurred. This could of happened because of a typo, or an error
in the code. Make sure there aren't any typos in the config file,
and check the traceback below (report it to GitHub for extra internet
points).
Hello, I'm trying to figure out why this isn't working. Here is my traceback:
Traceback (most recent call last):
File "C:\Users\A Dizzle Fo Shizzle\AppData\Local\Programs\Python\Python36-32\lib\configparser.py", line 1138, in _unify_values
sectiondict = self._sections[section]
KeyError: 'FAVORITE LOCATIONS'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\A Dizzle Fo Shizzle\Documents\GitHub\PyWeather\pyweather.py", line 162, in
favoritelocation_enabled = config.getboolean('FAVORITE LOCATIONS', 'enabled')
File "C:\Users\A Dizzle Fo Shizzle\AppData\Local\Programs\Python\Python36-32\lib\configparser.py", line 829, in getboolean
raw=raw, vars=vars, fallback=fallback, **kwargs)
File "C:\Users\A Dizzle Fo Shizzle\AppData\Local\Programs\Python\Python36-32\lib\configparser.py", line 809, in _get_conv
**kwargs)
File "C:\Users\A Dizzle Fo Shizzle\AppData\Local\Programs\Python\Python36-32\lib\configparser.py", line 803, in _get
return conv(self.get(section, option, **kwargs))
File "C:\Users\A Dizzle Fo Shizzle\AppData\Local\Programs\Python\Python36-32\lib\configparser.py", line 781, in get
d = self._unify_values(section, vars)
File "C:\Users\A Dizzle Fo Shizzle\AppData\Local\Programs\Python\Python36-32\lib\configparser.py", line 1141, in _unify_values
raise NoSectionError(section)
configparser.NoSectionError: No section: 'FAVORITE LOCATIONS'
\ Loading PyWeather...
\ Validating API key...
| Validating API key...
/ Validating API key...
Validating API key...
Loading PyWeather...
\ Loading PyWeather...
Hey, welcome to PyWeather!
Below, enter a location to check the weather for that location!
Traceback (most recent call last):
File "C:\Users\A Dizzle Fo Shizzle\Documents\GitHub\PyWeather\pyweather.py", line 751, in
if favoritelocation_available is True:
NameError: name 'favoritelocation_available' is not defined
[Finished in 1.4s]
I'm running Windows 7 and Python 3.6.3.
Any other information you might need, please let me know. I checked the "Known Issues" like you said, and didn't see anything.
Who wants to type favloc: or curloc:, amiright?
No one asked for it and you need MOAR speed to access these cool locations. fl:x
will now be for favorite locations, cl
for current location, pl:x
for previous locations, ap:<code>
for airports, and ps:<ID>
for PWSes.
Checklist:
When extra tools is disabled and a user inputs no into the input (in my case I inputted yes and then no after a different input), the extra tools cache time menu appears.
Checklist:
Quite an interesting one, but at least for one city (NY, on 1/1/2016), Wunderground reports the "hourly" data in 20 minute intervals. You can't get through the whole thing, as PyWeather cuts it short at 24 iterations.
There's also lots of UI fixes that need to occur.
Fix coming in 0.5.1 beta.
Lots of Google geocoder issues, and at this point I've gotten tired of dealing with it. Here's a list of everything that can go wrong:
To help fix this issues:
Oh the joys of APIs
Would add two new options to setup and the config file, and would allow users to separately customize the cache times of each.
Invalid data that isn't getting caught:
-9999F/-9999C dew point
N/A% humidity
Description: Adding the ability to see the weather for airports globally.
Checklist:
ETA for completing this feature: December 28, 2017
Changes to the filesystem in 0.6.2 beta would include:
Description: Adding the weather on Mars via. a separate API. Current conditions will be available, historical data will NOT be available.
This can be added as a favorite location since the code will be outright separated.
Low priority: This is a low priority feature, and this feature will be dropped if this takes too long to implement (or at least keeping current conditions).
EDIT (1/4/18): The API that was supposed to be used went down, and it's been down for a day now. Scrapping this feature as it was a) low priority and b) I don't want this in PyWeather given how the API can go down for long periods of time.
I do realize APIs go down occasionally but they don't sporadically go down for nearly 24 hours.
In the latest version of appJar, you can now have a Google Map be displayed without the need for an API key. This new feature would allow users to select a new radar location, and if they wanted to set the radar location back to the location they looked up.
The location selection tool button would appear in the top right, and if a different location has been selected, a "Default location" button would appear.
Presently the progress bar in PyWeather is a complete mess. I've been looking around for a library that can support the variability that comes with booting PyWeather (some people might have 15 or 25 steps to boot).
I found a cool library called Halo on /r/coolgithubprojects, but it lacks Windows support at the moment.
Adding the ability to set a custom user agent in the configuration file. Option will not be presented on set up.
New configuration options are as so:
[USERAGENT]
customagent_enabled = "False" (default)
customagent = "pyweather-0.6.2beta/apifetcher"
This will require changing all requests.get functions in PyWeather to be updated with a new argument.
I think you forgot to add something to the setup.py file...
----------------------------- BEGIN ERROR ----------------------------------
When attempting to load your configuration file, an error
occurred. This could of happened because of a typo, or an error
in the code. Make sure there aren't any typos in the config file,
and check the traceback below (report it to GitHub for extra internet
points).
Traceback (most recent call last):
File "/usr/lib/python3.5/configparser.py", line 786, in get
value = d[option]
File "/usr/lib/python3.5/collections/init.py", line 878, in getitem
return self.missing(key) # support subclasses that define missing
File "/usr/lib/python3.5/collections/init.py", line 870, in missing
raise KeyError(key)
KeyError: 'geoipservice_enabled'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/benjamin/Python/pyweather/pyweather.py", line 133, in
geoip_enabled = config.getboolean('UI', 'geoipservice_enabled')
File "/usr/lib/python3.5/configparser.py", line 826, in getboolean
raw=raw, vars=vars, fallback=fallback, **kwargs)
File "/usr/lib/python3.5/configparser.py", line 806, in _get_conv
**kwargs)
File "/usr/lib/python3.5/configparser.py", line 800, in _get
return conv(self.get(section, option, **kwargs))
File "/usr/lib/python3.5/configparser.py", line 789, in get
raise NoOptionError(option, section)
configparser.NoOptionError: No option 'geoipservice_enabled' in section: 'UI'
Hey, welcome to PyWeather!
Below, enter a location to check the weather for that location!
Traceback (most recent call last):
File "/home/benjamin/Python/pyweather/pyweather.py", line 485, in
if geoip_available is True:
NameError: name 'geoip_available' is not defined
--------------------------- END ERROR ----------------------------
On my phone, putting this here for later reference.
It's simply impossible for me to catch every bug in PyWeather, so you can help! Before you report an issue, run down this to-do list.
Done with the list? Here's what you'll need for a report.
You can go the extra mile by adding this stuff to your report.
If you'd like to keep this template in your report, that's completely fine. Otherwise, report the issue!
Bug should be fixed in 0.6.1 beta
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.