Comments (3)
Hi @nils2410,
Try switching your region to "US". Sometimes there are issues with authenticating in different regions. Let me know if that solution works for you.
from connected-car-python-sdk.
i changed the region to US:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/connectedcar/requester.py", line 37, in call
raise E.ResourceNotFoundException(response)
File "/usr/local/lib/python3.7/dist-packages/connectedcar/exceptions.py", line 9, in __init__
json = response.json()
File "/usr/local/lib/python3.7/dist-packages/requests/models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/simplejson/__init__.py", line 525, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.7/dist-packages/simplejson/decoder.py", line 373, in decode
raise JSONDecodeError("Extra data", s, end, len(s))
simplejson.errors.JSONDecodeError: Extra data: line 1 column 5 - line 2 column 1 (char 4 - 94)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "fordpass2openhab.py", line 27, in <module>
print(vehicle.details())
File "/usr/local/lib/python3.7/dist-packages/connectedcar/vehicle.py", line 104, in details
'/detail?lrdt=01-01-1970%2000:00:00')
File "/usr/local/lib/python3.7/dist-packages/connectedcar/api.py", line 68, in get
return requester.call('GET', url, headers=headers)
File "/usr/local/lib/python3.7/dist-packages/connectedcar/requester.py", line 51, in call
raise E.SyncException("Unexpected error") from e
connectedcar.exceptions.SyncException: Unexpected error``
response.text returns the following error:
404 Not Found: Requested route ('user-profile-proxy-prod.uspd01.cf.ford.com') does not exist.
from connected-car-python-sdk.
Login works fine, but there is a problem in details() in vehicle.py but status() works fine.
getData.py
`import connectedcar
from datetime import datetime
client = connectedcar.AuthClient(
'9fb503e0-715b-47e8-adfd-ad4b7770f73b',
None,
None) # Create client connection
access = client.get_user_access_token(
'email', 'password') # Fetch client access token
user = connectedcar.User(access['access_token']) # New User Object
vehicles = user.vehicles() # Fetch list of user vehicles
vehicleList = [] # Stored list of user vehicles
for userVehicle in vehicles: # For each user vehicle
vehicleList.insert(0, userVehicle['VIN'])
break
def ukaz(co):
currentVehicle = connectedcar.Vehicle(
vehicleList[0], access['access_token']) # IF YOU HAVE MORE CARS, THIS USE 1st [0].
a = datetime.today()
funkce = ("currentVehicle." + co + "()")
print ("")
print ("--- {} - -->".format(co))
print(eval(funkce)) # Send command
b = datetime.today()
sekund = ((b-a).total_seconds())
print ("<--- {} - {} s".format(co,sekund))
ukaz("odometer")
ukaz("fuel")
#and so on...`
I've been stuck on this for months but finally found the time to go through the code. It's a little thing, I believe the author will fix it easily when he has time. But it still works great for me. Thank you @ianjwhite99 for great work.
from connected-car-python-sdk.
Related Issues (20)
- Add Authorization Code Grant Type
- Exchange refresh token does not have a valid grant_type
- Recalls resource not found HOT 1
- Add application integration tests to validate API connection and methods
- Create GitHub actions to run unit/integration tests on push to branch
- Add recall status functionality HOT 1
- 401 - Authorization Issue
- Error 429 'Too Many Requests' HOT 1
- vehicle.capability() returning error HOT 1
- Authentication quit working HOT 4
- 502 Gateway error HOT 2
- Exception: Unable to login, missing location redirect HOT 7
- Add the ability to enable/disable charging
- Ford Account Lockout HOT 6
- connectedcar.exceptions.ValidationException: Unknown error HOT 1
- Authentication changed? HOT 1
- Max retries exceeded HTTPSConnectionPool HOT 1
- Fordpass for India
- Problem obtaining an Access Token for AU Client HOT 2
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 connected-car-python-sdk.