Giter Club home page Giter Club logo

Comments (2)

j6k4m8 avatar j6k4m8 commented on September 6, 2024

Hey @BillyCroan! Thanks for reporting. I just played around with this a little bit and was able to get the same error when I used an invalid username form instead of my complete email address. Can you try it again with your complete email address? (Maybe that's what you already did — correct me if I'm mistaken!)

It might be helpful to verify that your login info works here: https://www.myfordmobile.com/content/mfm/app/site/login.html

If that doesn't help, drop a note and we'll start triage! In the meantime, this is definitely a lousy error message to get for an invalid login, so I'll improve the error message that we send back to users :)

from prefect.

BillyCroan avatar BillyCroan commented on September 6, 2024

I checked into the username. It wasn't truncated. But I do use caps.... It turns out it works when I lcase my email address in .config/myfordmobile.json. I registered with and log into the web interface of MyFordMobile with proper nouns in my email address capitalized. So I bet ford is lcasing it in their web based login process and I just didn't think to try that until now.

I've implemented my use case in bash with curl now btw. And also weirdly enough I didn't have any trouble logging in with CamelCase in my email address in my script (attached).

And perhaps also of note, while providing my email in the .json file all lower case does get .authenticate to succeed, I get another error when i try to enumerate vehicles:

>>> f.get_vehicles()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/bcroan/.local/lib/python3.9/site-packages/prefect/__init__.py", line 316, in get_vehicles
    return [Vehicle.from_dict(r, self) for r in response]
  File "/home/bcroan/.local/lib/python3.9/site-packages/prefect/__init__.py", line 316, in <listcomp>
    return [Vehicle.from_dict(r, self) for r in response]
  File "/home/bcroan/.local/lib/python3.9/site-packages/prefect/__init__.py", line 52, in from_dict
    v._update_from_dict(data)
  File "/home/bcroan/.local/lib/python3.9/site-packages/prefect/__init__.py", line 61, in _update_from_dict
    self._dte = float(data.get("OVERALLDTE", 0))
TypeError: float() argument must be a string or a number, not 'dict'

So there might be a few todos:
more clear error message on failed auth
lcase the username on or around line 285 of PyMyFord/prefect/blob/master/prefect/init.py
looks like ford is sending back a different format than expected on get_vehicles (Or they're sending the single 4 digit error code responses that I've seen. I think like "6000"
getrange.txt
for auth error

from prefect.

Related Issues (2)

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.