Comments (7)
I'm not at home atm, I'll send u the output of that curl later although I believe I use ip-api for another program (to get my weather based on my location and it works fine). I am using cloudfares dns (1.1.1.1). Can this be a problem? Maybe the problem is even with my /etc/hosts. I'll try removing it and seeing what happens as soon as I get home. Thx for the help
from tzupdate.
Thanks a lot
from tzupdate.
Hi there,
Is this just me or has the api deprecated?
If you get this, it means that all APIs didn't respond within 5 seconds. Even if one is not working, that won't cause this.
What does running with --debug
show, and which version are you running?
from tzupdate.
When i run it with debug i get:
`DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): ipapi.co:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): freegeoip.app:443
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): ip-api.com:80
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): worldtimeapi.org:80
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/tzupdate.py", line 64, in get_timezone
timezone = q.get(block=True, timeout=timeout)
File "/usr/lib/python3.7/multiprocessing/queues.py", line 105, in get
raise Empty
_queue.Empty
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/tzupdate", line 11, in
load_entry_point('tzupdate==1.5.0', 'console_scripts', 'tzupdate')()
File "/usr/lib/python3.7/site-packages/tzupdate.py", line 279, in main
timezone = get_timezone(args.ip, timeout=args.timeout, services=services)
File "/usr/lib/python3.7/site-packages/tzupdate.py", line 67, in get_timezone
"No usable response from any API in {} seconds".format(timeout)
tzupdate.TimezoneAcquisitionError: No usable response from any API in 5.0 seconds`
I am using the version 1.5.0-1 (latest in arch repos)
from tzupdate.
Okay, so none of those sites had any errors (or you would see it in the debug output), they just didn't respond within 5 seconds.
This seems like something localised to your internet setup. Judging by the fact that you never even send the GET request, there might be something wrong with your DNS.
What does time curl -v http://ip-api.com/json/
show?
from tzupdate.
I just got home and the time to run that command is 5.42s. That is probably why it doesnt work. Maybe you could make it so that instead of waiting only for 5s it waited for 6s? Thx
from tzupdate.
For now, you can use tzupdate --timeout 6
:-)
That said, I'll bump the timeout. That latency is massive though, much more than I expected any successful request could be :-)
from tzupdate.
Related Issues (20)
- Split the python version and the rust version into two separate projects. HOT 5
- Consider checking which timezone path the system uses HOT 5
- Add a service file to change the timezone on boot HOT 4
- first launch onAarch after clone from AUR and makepkg -si HOT 2
- version 2.0.0 compatibility issues python2/3 symlink HOT 4
- SSL error message when running tzupdate with python 3.8 HOT 5
- Add to documentation HOT 1
- Invalid syntax HOT 2
- Debian10&Kali linux HOT 1
- Error Exception on Fail to connect to Internet HOT 4
- SyntaxError on Docker Debian:buster-slim HOT 1
- Add this terrific documentation HOT 1
- `http://ip-api.com/json/{ip}` gives inaccurate responses HOT 1
- "No module named 'tzupdate'" HOT 4
- Allow pulling out timezone APIs from code
- Add --consensus instead of picking first
- If all services failed, fail quickly instead of timing out
- Proposal: Add Timezone Information from Free IP2Location.io API HOT 2
- Previous timezone not cleared HOT 3
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 tzupdate.