You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/09/26 05:00:30 UTC

[GitHub] [superset] lsyarn commented on issue #15768: Postgresql DB Engine Error: '>=' not supported between instances of 'datetime.timedelta' and 'int'

lsyarn commented on issue #15768:
URL: https://github.com/apache/superset/issues/15768#issuecomment-927232198


   Work fine  after modify postgres db engine, and timezone offset problem in explore solved.
   Steps with docker-compose instance(version=1.3.1).
   ```bash
   docker exec -it superset_app /bin/bash
   apt-get update
   apt-get install vim
   vim /app/superset/db_engine_specs/postgres.py 
   # delete line 171 (cursor.tzinfo_factory = FixedOffsetTimezone)
   exit
   # back to host machine
   docker-compose -f docker-compose-non-dev.yml restart
   ```
   [psycopg 2.9 release note](https://www.psycopg.org/docs/news.html#what-s-new-in-psycopg-2-9)
   psycopg2 updated to use `datetime.timezone` as `tz` property of datetime object, we do not need `pytz._FixedOffset` any more. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org