-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON decoder timestamp error #170
Comments
@doutriaux1 this was the issue that I pointed out yesterday was making it very difficult to work interactively.. It seems the import statement for the |
@doutriaux1 this might work as implemented for jupyter: def _ensure_tzinfo(dt):
"""Ensure a datetime object has tzinfo
If no tzinfo is present, add tzlocal
"""
if not dt.tzinfo:
# No more naïve datetime objects!
warnings.warn(u"Interpreting naive datetime as local %s. Please add timezone info to timestamps." % dt,
DeprecationWarning,
stacklevel=4)
dt = dt.replace(tzinfo=tzlocal())
return dt |
@doutriaux1 this is now rendering In [10]: import vcs
/export/durack1/anaconda2/envs/cdatcmornclnco/lib/python2.7/json/encoder.py:207: DeprecationWarning: Interpreting naive datetime as local 2017-04-12 17:11:19.496976. Please add timezone info to timestamps.
chunks = self.iterencode(o, _one_shot=True)
In [11]: /export/durack1/anaconda2/envs/cdatcmornclnco/lib/python2.7/json/encoder.py:207: DeprecationWarning: Interpreting naive datetime as local 2017-04-12 17:11:21.349779. Please add timezone info to timestamps.
chunks = self.iterencode(o, _one_shot=True)
/export/durack1/anaconda2/envs/cdatcmornclnco/lib/python2.7/json/encoder.py:207: DeprecationWarning: Interpreting naive datetime as local 2017-04-12 17:11:21.370540. Please add timezone info to timestamps.
chunks = self.iterencode(o, _one_shot=True)
no more active python session |
@durack1 on oceanonly? Can you please provide
thx! |
@doutriaux1 it's wrapped up in an import statement somewhere, and is occurring when using the
|
ok so it does sound like a spyder issue no? |
i'll take a look |
@doutriaux1 nope, I tried testing a vanilla |
i don't see what triggers this though. There's no link to our code anywhere, I can try to pdb it.... |
I really think it's a spyder issue, json is part of python
it's their parsing thing that's broken |
when did it break? |
@doutriaux1 it triggers when |
@doutriaux1 it broke with the recent builds.. So one of the dependencies changed, and it started to occur |
trying with 2.8, the main diff is probably that we refactored all the docstrings |
@durack1 please try nightlies I just uploaded on conda and let me know. Thx. |
@doutriaux1 did you chase down the issue? Is there a PR somewhere? And which package needs updating from conda? |
it's in master and in nightlies please try and report. One of the doc string seemed to have a weird type, but I'm a bit afraid I broke some doc string by fixing it, because it was the only change in a commit titled "fix doc string" |
@doutriaux1 which package - vcs? I'll overwrite and start testing this now |
vcs |
@doutriaux1 I don't suppose there is a |
@doutriaux1 almost...
And the version info:
|
|
@doutriaux1 yep, it worked. Commenting out vcs/Canvas.py#L65 63
64 # Python < 3 DeprecationWarning ignored by default
65 #warnings.simplefilter('default')
66 Leads to an iPython/jupyter session now looking like:
So it's just a matter of checking with @aashish24 and @embrown to make sure this tweak doesn't break anything and I am fixed.. And the issue can be closed |
@aashish24 it seems like very bad practice to start changing the default python |
#178 fixes this |
@doutriaux1 @durack1 this shouldn't break the docstrings, if it's just a deprecation warning being commented out. I never put any warnings in, so I'm not sure whether this was there before I touched it or put in after. |
It seems that a
json
package update has triggered the following warning, whenvcs
imports this package it seems to require a global attribute or environment variable set that isn't currently setThe text was updated successfully, but these errors were encountered: