-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Problem plotting historical time series #1402
Comments
Hi @elysiumfield, thanks for the report. Could you add the versions of Python and pandas that you're using? I'm not able to reproduce the error with Python 3.6, pandas 0.23, and and plotly 3.5.0 on MacOS. I get the following figure: Thanks! |
Also, have you seen this Stack Overflow thread? https://stackoverflow.com/questions/37494983/python-fromtimestamp-oserror Could you try the code example from this comment https://stackoverflow.com/a/45372194/4551895: import datetime
import platform
print(
"Running on Python ver.{} on {} {}\n" \
.format(
platform.python_version(),
platform.system(),
platform.release()
)
)
for timestamp in range(1, 100000000):
try:
dt = datetime.datetime.fromtimestamp(timestamp)
except:
pass
else:
break
print(
"Smallest accepted Unix timestamp by {}: '{}' ({})" \
.format(platform.system(), timestamp, dt)
) On OS X I get
|
Hi @jonmmease, I think you are on the right track. I am using Python 3.7 and Pandas 0.23.4. Running the code you posted, I got: Running on Python ver.3.7.1 on Windows 7 I also get the same problem as in the link you posted, but it doesn't say how to solve it. |
I have tested a bit more. Tried my test code on another other computer and it worked. That one is having: Running on Python ver.3.6.4 on Windows 7 I updated Plotly to ver 3.5.0 and it still works. But datetime.datetime.fromtimestamp(-43201, pytz.utc) gives [Errno 22] error. Not sure that my plot problem is related to datetime in Windows after all. The main difference I know of between my test on the two different computers is python 3.7 vs 3.6, but there are probably more differences due to dependencies on other packages. |
Problem can be changed by a 1-character-fix in the code ;-) |
OK great, thanks. |
Fixed by #1501 |
I have recently updated plotly to ver 3.5.0 and am having problems plotting historical time series. The test code is as follows:
This code returns the error:
However, defining dt = pd.date_range(start='1970-03-31', periods=270, freq='Q'), everything works fine. I am positive that previous versions of plotly could plot datetimeindex that was older.
The text was updated successfully, but these errors were encountered: