Giter Club home page Giter Club logo

Comments (7)

Baitinq avatar Baitinq commented on July 22, 2024 1

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.

Baitinq avatar Baitinq commented on July 22, 2024 1

Thanks a lot

from tzupdate.

cdown avatar cdown commented on July 22, 2024

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.

Baitinq avatar Baitinq commented on July 22, 2024

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.

cdown avatar cdown commented on July 22, 2024

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.

Baitinq avatar Baitinq commented on July 22, 2024

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.

cdown avatar cdown commented on July 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.