I decided to fork and run this for my company and everything seems in order until I try to connect my Slack, as a user. Basically, this gets thrown:
Traceback (most recent call last):
backend_1 | File "/usr/local/lib/python3.8/site-packages/uvicorn/protocols/http/httptools_impl.py", line 385, in run_asgi
backend_1 | result = await app(self.scope, self.receive, self.send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
backend_1 | return await self.app(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/fastapi/applications.py", line 140, in __call__
backend_1 | await super().__call__(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/applications.py", line 134, in __call__
backend_1 | await self.error_middleware(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 178, in __call__
backend_1 | raise exc from None
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 156, in __call__
backend_1 | await self.app(scope, receive, _send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/middleware/sessions.py", line 75, in __call__
backend_1 | await self.app(scope, receive, send_wrapper)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 73, in __call__
backend_1 | raise exc from None
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 62, in __call__
backend_1 | await self.app(scope, receive, sender)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 590, in __call__
backend_1 | await route(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 208, in __call__
backend_1 | await self.app(scope, receive, send)
backend_1 | File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 41, in app
backend_1 | response = await func(request)
backend_1 | File "/usr/local/lib/python3.8/site-packages/fastapi/routing.py", line 133, in app
backend_1 | raw_response = await dependant.call(**values)
backend_1 | File "/spotify-my-slack/backend/routers/slack.py", line 62, in slack_grant_callback
backend_1 | await sign_in(request)
backend_1 | File "/spotify-my-slack/backend/utils/auth.py", line 18, in sign_in
backend_1 | user, created = await get_or_create_from_session(session=request.session)
backend_1 | File "/usr/local/lib/python3.8/site-packages/databases/core.py", line 321, in wrapper
backend_1 | return await func(*args, **kwargs)
backend_1 | File "/spotify-my-slack/backend/database/users.py", line 76, in get_or_create_from_session
backend_1 | user = await User.objects.create(
backend_1 | File "/usr/local/lib/python3.8/site-packages/orm/models.py", line 237, in create
backend_1 | instance.pk = await self.database.execute(expr)
backend_1 | File "/usr/local/lib/python3.8/site-packages/databases/core.py", line 152, in execute
backend_1 | return await connection.execute(query, values)
backend_1 | File "/usr/local/lib/python3.8/site-packages/databases/core.py", line 240, in execute
backend_1 | return await self._connection.execute(self._build_query(query, values))
backend_1 | File "/usr/local/lib/python3.8/site-packages/databases/backends/postgres.py", line 158, in execute
backend_1 | return await self._connection.fetchval(query, *args)
backend_1 | File "/usr/local/lib/python3.8/site-packages/asyncpg/connection.py", line 438, in fetchval
backend_1 | data = await self._execute(query, args, 1, timeout)
backend_1 | File "/usr/local/lib/python3.8/site-packages/asyncpg/connection.py", line 1402, in _execute
backend_1 | result, _ = await self.__execute(
backend_1 | File "/usr/local/lib/python3.8/site-packages/asyncpg/connection.py", line 1411, in __execute
backend_1 | return await self._do_execute(query, executor, timeout)
backend_1 | File "/usr/local/lib/python3.8/site-packages/asyncpg/connection.py", line 1433, in _do_execute
backend_1 | result = await executor(stmt, None)
backend_1 | File "asyncpg/protocol/protocol.pyx", line 178, in bind_execute
backend_1 | File "asyncpg/protocol/prepared_stmt.pyx", line 160, in asyncpg.protocol.protocol.PreparedStatementState._encode_bind_msg
backend_1 | asyncpg.exceptions.DataError: invalid input for query argument $1: datetime.datetime(2020, 2, 26, 15, 13, 6... (can't subtract offset-naive and offset-aware datetimes)
I've tried to make all the datetime objects in the code timezone-unaware, to see if anything odd was going on there, but that didn't help anything. I realize you're no longer maintaining this, but I thought I'd ask, just in case it's something you've already encountered and had a minute to answer. Thanks !