dswah / pyGAM

[HELP REQUESTED] Generalized Additive Models in Python
https://pygam.readthedocs.io
Apache License 2.0
862 stars 159 forks source link

how to remove the following DeprecationWarning msg in jupyter notebook after using pygam? #220

Closed jzang18 closed 5 years ago

jzang18 commented 5 years ago

this warning shows up in every cell after using pygam: "xxx/anaconda/lib/python2.7/json/encoder.py:207: DeprecationWarning: Interpreting naive datetime as local 2018-10-26 09:17:00.557755. Please add timezone info to timestamps. chunks = self.iterencode(o, _one_shot=True)"

It ONLY shows up after I use pygam. I am using python 2.7.15.

dswah commented 5 years ago

@jzang18 i suspect that https://github.com/dswah/pyGAM/blob/master/pygam/utils.py#L229 might be the cause of this.

dswah commented 5 years ago

@jzang18 i think https://github.com/dswah/pyGAM/pull/221 may fix this warning. i will push a new version and let you know when it is ready to try.

dswah commented 5 years ago

@jzang18 i installed python 2.7.15 and numpy 1.11, but I have not been able to reproduce this jupyter warning.

jzang18 commented 5 years ago

I'ts probably not python and numpy. I don't have issues in python run. I only have issues when using jupyter notebook. And warnings appears every time I run something after I using pygam. I noticed this after update in Aug/Sept. I tried update my python/numpy/pandas, etc, nothing helps.

jzang18 commented 5 years ago

google shows me it's from a jupyter/jso issue around 2017, although my jupyter is up to date. Not why is issue only kicks in after I use pygam.

https://bugs.python.org/issue30063 https://github.com/CDAT/vcs/issues/170#issuecomment-294219991

jzang18 commented 5 years ago

it's good now after updating utils.py