Comments (13)
Hi, does your API key follow the regex ^[a-z0-9]{31,}$
? If you don't know what that means, in other words:
- Does it contain upper-case letters?
- Does it contain symbols?
- Is it shorter than 31 characters?
from gnome-openweather.
Also for now you can use:
gsettings --schemadir ~/.local/share/gnome-shell/extensions/[email protected]/schemas set org.gnome.shell.extensions.openweatherrefined custom-keys "['', '<KEY>', '', '']"
as pointed out in #57.
from gnome-openweather.
My WeatherAPI.com key is 30 character hexadecimal, just digits plus the lower case letters a-f. BTW, my Visual Crossing API key is 25 characters, alphanumeric, with upper case letters, and that saves fine. So does my OpenWeatherMap key which is 32 chars, hexadecimal, lower case a-f. (When I say they save fine, I mean that there's a square with a check mark next to each of those. What does that mean - as opposed to the warning sign from WeatherAPI.com?)
from gnome-openweather.
Somehow your key was shorter than mine so I've reduced the requirement to 5 or more characters now, before it was 31 or more which is why it was detecting your key as invalid.
from gnome-openweather.
Also for now you can use:
gsettings --schemadir ~/.local/share/gnome-shell/extensions/[email protected]/schemas set org.gnome.shell.extensions.openweatherrefined custom-keys "['', '<KEY>', '', '']"as pointed out in #57.
Thanks for pointing that out. When I ran the command gsettings --schemadir ~/.local/share/gnome-shell/extensions/[email protected]/schemas get org.gnome.shell.extensions.openweatherrefined custom-keys
to see what my existing settings were, it was ['openweathermapkey', '', 'visualcrossingkey']
. I ran the set command to include the WeatherAPI.com key, and also added a fourth blank entry, so now it's ['openweathermapkey', 'weatherapikey', 'visualcrossingkey', '']
. The WeatherAPI.com API key shows up in the UI now (though I'm not sure if it's permanent yet) but it still has the warning sign next to it.
from gnome-openweather.
I just ran the get command again, and the output is now ['openweathermapkey', '', 'visualcrossingkey', '']
. So it apparently removes a key automatically if it's detected as invalid.
from gnome-openweather.
The fourth key entry is fine, but it shouldn't be deleting any keys even if they're invalid. Were you toggling "Use Custom Key" on/off?
from gnome-openweather.
I may have toggled it, but I'm not sure. Experimenting with the gsettings commands, it appears that toggling it off causes the corresponding key to be deleted, for any of the providers, whether the key is considered valid or not. Personally, I don't like that behavior, I'd prefer to be able to enter the key once and then be able to toggle "Use Custom Key" to control whether it's used, without having to re-enter it each time I toggle it back on.
Edit: Also, if turning "Use Custom API Key" off and then back on causes the key to be automatically deleted, then it's not really a toggle, since one ends up in a different state than originally. If I wanted to change or erase the key, I'd expect to be able to turn "Use Custom API Key" on, and then manually change or erase the key value in the box.
from gnome-openweather.
I sent an email to WeatherAPI.com asking them about the length and format of their API keys and got the response "Our API key is max 31 characters and is comprised of alphabets and numbers." Not too detailed but it seems that 31 chars is the maximum, not minimum.
from gnome-openweather.
@robatino thanks for the UI advice, I'll take it into consideration in the re-work I'm doing.
Thanks for emailing them, that's interesting.
from gnome-openweather.
I'm still having this issue with version 138, please reopen. If I enable "Use custom API key" and paste in my WeatherAPI key, then close settings and reopen, the key is gone.
Right now the extension built-in key is returning "too many users" errors, which may be part of the issue. But it's definitely blanking my key.
Also, if I paste my key into the settings (with "Use custom API key" switched on), this is what I get in the terminal (either with the Settings window still open, or after closing it):
$ gsettings --schemadir \
~/.local/share/gnome-shell/extensions/[email protected]/schemas \
get org.gnome.shell.extensions.openweatherrefined custom-keys
['', '', '']
Notice that the array only has three items, when apparently it should have four? Sounds like the code might not be properly accounting for older settings with different numbers of custom keys.
from gnome-openweather.
If I manually run this:
$ gsettings --schemadir \
~/.local/share/gnome-shell/extensions/[email protected]/schemas \
set org.gnome.shell.extensions.openweatherrefined custom-keys \
['', '<KEY>', '', '']
...Then the key sticks around, shows up in the Settings window, and works. But setting it via the UI doesn't work, if the gsettings
value starts as ['', '', '']
due to older preferences.
from gnome-openweather.
(Sorry, I guess this is more a manifestation of #57 than #58. But that report is definitely not 'invalid'. This is an issue with v138, which appears to be caused by the change in preferences format from older versions of the extension.)
from gnome-openweather.
Related Issues (20)
- Settings doesn't remember Custom API key for OpenWeatherMap HOT 3
- Unable to insert API key HOT 4
- Add Open-Meteo as Weather Provider HOT 2
- can't set API key, value is set to empty HOT 10
- I can't see any value in a recient updates (show all parameters in blank) HOT 4
- Not working with own API key HOT 46
- Feature Request: Add Weather Underground as a provider HOT 3
- openweathermap custom API broken in v138 HOT 5
- Only sunrise in panel HOT 2
- Translation issues HOT 2
- Openweather Revisited Fails with Too Many Users HOT 1
- Add Provider "Open-Meteo" HOT 1
- Forecast summary per day instead of by hour
- Center today's forecast results in right-align HOT 1
- Setting "Total Days In Forecast" to 0 prevents parsing today HOT 1
- Infinite Loading HOT 1
- Visual Crossing Gets Night/Day Icons and Sunrise/Sunset Wrong HOT 6
- Gnome 47 HOT 1
- My Location stuck in Unknown HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gnome-openweather.