Coder Social home page Coder Social logo

Comments (8)

argrento avatar argrento commented on May 26, 2024

Hello. How do you run the script?

from huami-token.

Didier-Croes avatar Didier-Croes commented on May 26, 2024

from huami-token.

argrento avatar argrento commented on May 26, 2024

That's weird: just checked and can not reproduce this error.
Add this line
print(redirect_url_parameters)
just before if 'country_code' not in redirect_url_parameters: at the line 87

if 'country_code' not in redirect_url_parameters:
.

And paste the printed line here. It should look like this:
{'state': ['REDIRECTION'], 'region': ['us-west-2'], 'access': [TOKEN], 'country_code': ['US'], 'countryState': ['US-NY'], 'expiration': [SOME DIGITS]}

from huami-token.

Didier-Croes avatar Didier-Croes commented on May 26, 2024

{'state': ['REDIRECTION'], 'region': ['eu-central-1'], 'access': ['DYpQhfLqAwJQPWV63B6Nt'], 'expiration': ['1614595873']}

from huami-token.

Didier-Croes avatar Didier-Croes commented on May 26, 2024

I have an amazfit bip S

from huami-token.

argrento avatar argrento commented on May 26, 2024

As a temporary workaround:

  1. Comment line 87:
    if 'country_code' not in redirect_url_parameters:
  2. Comment line 88
    raise ValueError("No 'country_code' parameter in login url.")
  3. Update line 91:
    self.country_code = redirect_url_parameters['country_code']
    to self.country_code = "EU"

This should fix the problem.

from huami-token.

Didier-Croes avatar Didier-Croes commented on May 26, 2024

That solved the issue
thanks a lot

from huami-token.

argrento avatar argrento commented on May 26, 2024

Great. Thanks for pointing out that sometimes server does not return country_code.

from huami-token.

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.