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/12/06 16:23:14 UTC

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

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


   > Work fine after modify postgres db engine, and timezone offset problem in explore solved. Steps with docker-compose instance(version=1.3.1).
   > 
   > ```shell
   > 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 solution works for me.
   
   ![image](https://user-images.githubusercontent.com/57228/144882866-3f1d753e-bc2b-4e01-a017-5686e799d0e2.png)
   


-- 
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