Hi,
I'm getting this very strange error in my forked Heroku instance. Functions like start the engine works fine but the return value causes a 500 error. I tried deploying the same code on my local machine but it doesn't give any error.
Any ideas?
Thank you
2022-01-23T05:27:08.823853+00:00 heroku[router]: at=info method=POST path="/vehiclesStatus" host=mazda-xxx.herokuapp.com request_id=d55bdac6-4930-4b49-ba60-06ab7273ea26 fwd="76.121.172.145" dyno=web.1 connect=0ms service=79ms status=500 bytes=463 protocol=https
2022-01-23T05:27:08.821795+00:00 app[web.1]: [2022-01-23 05:27:08,821] ERROR in app: Exception on /vehiclesStatus [POST]
2022-01-23T05:27:08.821800+00:00 app[web.1]: Traceback (most recent call last):
2022-01-23T05:27:08.821801+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/flask/app.py", line 2073, in wsgi_app
2022-01-23T05:27:08.821801+00:00 app[web.1]: response = self.full_dispatch_request()
2022-01-23T05:27:08.821809+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/flask/app.py", line 1518, in full_dispatch_request
2022-01-23T05:27:08.821810+00:00 app[web.1]: rv = self.handle_user_exception(e)
2022-01-23T05:27:08.821810+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/flask/app.py", line 1516, in full_dispatch_request
2022-01-23T05:27:08.821810+00:00 app[web.1]: rv = self.dispatch_request()
2022-01-23T05:27:08.821811+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/flask/app.py", line 1502, in dispatch_request
2022-01-23T05:27:08.821811+00:00 app[web.1]: return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
2022-01-23T05:27:08.821812+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/asgiref/sync.py", line 204, in __call__
2022-01-23T05:27:08.821813+00:00 app[web.1]: return call_result.result()
2022-01-23T05:27:08.821813+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/concurrent/futures/_base.py", line 439, in result
2022-01-23T05:27:08.821813+00:00 app[web.1]: return self.__get_result()
2022-01-23T05:27:08.821814+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result
2022-01-23T05:27:08.821814+00:00 app[web.1]: raise self._exception
2022-01-23T05:27:08.821814+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/asgiref/sync.py", line 270, in main_wrap
2022-01-23T05:27:08.821815+00:00 app[web.1]: result = await self.awaitable(*args, **kwargs)
2022-01-23T05:27:08.821815+00:00 app[web.1]: File "/app/app.py", line 44, in getStatus
2022-01-23T05:27:08.821816+00:00 app[web.1]: status = await client.get_vehicle_status(vid)
2022-01-23T05:27:08.821816+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pymazda/client.py", line 65, in get_vehicle_status
2022-01-23T05:27:08.821816+00:00 app[web.1]: vehicle_status_response = await self.controller.get_vehicle_status(vehicle_id)
2022-01-23T05:27:08.821817+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pymazda/controller.py", line 31, in get_vehicle_status
2022-01-23T05:27:08.821817+00:00 app[web.1]: response = await self.connection.api_request("POST", "remoteServices/getVehicleStatus/v4", body_dict=post_body, needs_keys=True, needs_auth=True)
2022-01-23T05:27:08.821818+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pymazda/connection.py", line 158, in api_request
2022-01-23T05:27:08.821818+00:00 app[web.1]: return await self.__api_request_retry(method, uri, query_dict, body_dict, needs_keys, needs_auth, num_retries=0)
2022-01-23T05:27:08.821819+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pymazda/connection.py", line 165, in __api_request_retry
2022-01-23T05:27:08.821819+00:00 app[web.1]: await self.__ensure_keys_present()
2022-01-23T05:27:08.821819+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pymazda/connection.py", line 253, in __ensure_keys_present
2022-01-23T05:27:08.821820+00:00 app[web.1]: await self.__retrieve_keys()
2022-01-23T05:27:08.821820+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pymazda/connection.py", line 268, in __retrieve_keys
2022-01-23T05:27:08.821820+00:00 app[web.1]: response = await self.api_request("POST", "service/checkVersion", needs_keys=False, needs_auth=False)
2022-01-23T05:27:08.821820+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pymazda/connection.py", line 158, in api_request
2022-01-23T05:27:08.821820+00:00 app[web.1]: return await self.__api_request_retry(method, uri, query_dict, body_dict, needs_keys, needs_auth, num_retries=0)
2022-01-23T05:27:08.821821+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pymazda/connection.py", line 173, in __api_request_retry
2022-01-23T05:27:08.821822+00:00 app[web.1]: return await self.__send_api_request(method, uri, query_dict, body_dict, needs_keys, needs_auth)
2022-01-23T05:27:08.821822+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pymazda/connection.py", line 229, in __send_api_request
2022-01-23T05:27:08.821822+00:00 app[web.1]: response_json = await response.json()
2022-01-23T05:27:08.821822+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1103, in json
2022-01-23T05:27:08.821823+00:00 app[web.1]: raise ContentTypeError(
2022-01-23T05:27:08.821824+00:00 app[web.1]: aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html', url=URL('https://0cxo7m58.mazda.com/prod/service/checkVersion')