-
-
Notifications
You must be signed in to change notification settings - Fork 119
Closed
Description
Hello, I'm building a simple flask api that converts tag location to openhaystack reports (so that I can tweak the app to use real airtags)... and so I have put toghether a docker-compose with findmy inside flask and anisette.
It works the first time I login... After that I get this message:
root@63ae2a4c766f:/app# python get_reports.py
Traceback (most recent call last):
File "/app/get_reports.py", line 4, in <module>
reports = get_reports()
^^^^^^^^^^^^^
File "/app/app.py", line 50, in get_reports
reports[name] = (get_report(name))
^^^^^^^^^^^^^^^^
File "/app/app.py", line 39, in get_report
acc.fetch_last_reports(airtag),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/findmy/reports/account.py", line 1077, in fetch_last_reports
return self._evt_loop.run_until_complete(coro)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/findmy/reports/account.py", line 680, in fetch_last_reports
return await self.fetch_reports(keys, start, end)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/findmy/reports/account.py", line 639, in fetch_reports
return await self._reports.fetch_reports(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/findmy/reports/reports.py", line 239, in fetch_reports
reports.extend(await self._fetch_reports(date_from, date_to, chunk))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/findmy/reports/reports.py", line 260, in _fetch_reports
data = await self._account.fetch_raw_reports(start_date, end_date, ids)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/findmy/reports/account.py", line 594, in fetch_raw_reports
resp = r.json()
^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/findmy/util/http.py", line 48, in json
return json.loads(self.text())
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7b0291a2fc50>
ERROR:asyncio:Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7b0291be3310>, 10243.288814196)]']
connector: <aiohttp.connector.TCPConnector object at 0x7b0291a2d5d0>
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7b0291a72f50>
ERROR:asyncio:Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7b0291be2d60>, 10243.775111868)]']
connector: <aiohttp.connector.TCPConnector object at 0x7b0291a1bc90>Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels