Sasquatch
Sasquatch

Reputation: 65

Value error: invalid argument with PyPy when importing pandas and plotly

When importing pandas and pyplot modules into pypy I get the following the error.

Python 3.6.1 (784b254d6699, Apr 16 2019, 12:10:48)
[PyPy 7.1.1-beta0 with MSC v.1910 32 bit] on win32
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``rpython: syntax and semantics of
python, speed of c, restrictions of java and compiler error messages as
penetrable as MUMPS''
>>>> import pandas
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\pypy3.6-v7.1.1-win32\site-packages\pandas\__init__.py", line 13, in <
module>
    __import__(dependency)
  File "C:\pypy3.6-v7.1.1-win32\site-packages\pytz\__init__.py", line 20, in <mo
dule>
    from pytz.tzinfo import unpickler, BaseTzInfo
  File "C:\pypy3.6-v7.1.1-win32\site-packages\pytz\tzinfo.py", line 27, in <modu
le>
    _epoch = datetime.utcfromtimestamp(0)
  File "C:\pypy3.6-v7.1.1-win32\lib-python\3\datetime.py", line 1484, in utcfrom
timestamp
    return cls._fromtimestamp(t, True, None)
  File "C:\pypy3.6-v7.1.1-win32\lib-python\3\datetime.py", line 1459, in _fromti
mestamp
    y, m, d, hh, mm, ss = converter(t - max_fold_seconds)[:6]
ValueError: Invalid argument

>>>> import plotly
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\pypy3.6-v7.1.1-win32\site-packages\plotly\__init__.py", line 32, in <
module>
    from plotly import (
  File "C:\pypy3.6-v7.1.1-win32\site-packages\plotly\graph_objs\__init__.py", li
ne 3, in <module>
    from plotly.basedatatypes import BaseLayoutType as _BaseLayoutType
  File "C:\pypy3.6-v7.1.1-win32\site-packages\plotly\basedatatypes.py", line 12,
 in <module>
    from _plotly_utils.utils import _natural_sort_strings
  File "C:\pypy3.6-v7.1.1-win32\site-packages\_plotly_utils\utils.py", line 6, i
n <module>
    import pytz
  File "C:\pypy3.6-v7.1.1-win32\site-packages\pytz\__init__.py", line 20, in <mo
dule>
    from pytz.tzinfo import unpickler, BaseTzInfo
  File "C:\pypy3.6-v7.1.1-win32\site-packages\pytz\tzinfo.py", line 27, in <modu
le>
    _epoch = datetime.utcfromtimestamp(0)
  File "C:\pypy3.6-v7.1.1-win32\lib-python\3\datetime.py", line 1484, in utcfrom
timestamp
    return cls._fromtimestamp(t, True, None)
  File "C:\pypy3.6-v7.1.1-win32\lib-python\3\datetime.py", line 1459, in _fromti
mestamp
    y, m, d, hh, mm, ss = converter(t - max_fold_seconds)[:6]
ValueError: Invalid argument

The modules installed fine with pip and I haven't encountered the same problem with numpy. I know on the pypy website it says it supports pandas so what could be the problem?

EDIT: Also, when I go into pypy -> help() -> modules -> pandas is listed but when I go into it, it returns:

problem in pandas - ValueError: Invalid argument

EDIT 2: I tried creating a virtualenv and exactly the same thing happens. Numpy fine, the rest of the packages throw an invalid argument error...

Upvotes: 0

Views: 313

Answers (1)

mattip
mattip

Reputation: 2563

This was fixed in May, but a new version has not been released with the fix. You can use the latest valid (non-0MB) windows download from our nightly builds which is http://buildbot.pypy.org/nightly/py3.6/pypy-c-jit-96765-24757bd09ed9-win32.zip

Upvotes: 1

Related Questions