Incubator-superset: Was unable to import superset Error: cannot import name '_maybe_box_datetimelike'

Created on 28 Jan 2019  路  19Comments  路  Source: apache/incubator-superset

Superset version

Superset version 0.28.1
python 3.6.6

(superset) [root@superset opt]# fabmanager create-admin --app superset
Username [admin]: admin
User first name [admin]: admin
User last name [user]: admin
Email [[email protected]]: [email protected]
Password:
Repeat for confirmation:
Was unable to import superset Error: cannot import name '_maybe_box_datetimelike'

The above problem occurred when initializing superset. How to handle it

answered docker v0.28

Most helpful comment

tx @Uneasy-listening !!!

This worked for me:

    1.
# pip uninstall pandas

[only necessary if you have already installed pandas (probably ver 0.24.0)
To test version:
# pip list | grep pandas
]

2.

# pip install pandas==0.23.4

All 19 comments

HI.

It seems as if it is a problem with the latest Pandas update as in 6765 . It should be fine if you downgrade your pandas version

@mildrabbit I've the same problem... The @Uneasy-listening's solution solved it for you?

@jmarti15 @Uneasy-listening Yes, according to 6765 method, this problem has been solved. Thanks.

tx @Uneasy-listening !!!

This worked for me:

    1.
# pip uninstall pandas

[only necessary if you have already installed pandas (probably ver 0.24.0)
To test version:
# pip list | grep pandas
]

2.

# pip install pandas==0.23.4

@jmarti15 @Uneasy-listening 锟結es, according to 6765 method, this problem has been solved. Thanks.

tx @mildrabbit

@jmarti15 Thanks

The latest superset release 0.29.0rc7 is broken because of this. Time for a new release?

I "fixed" it by simply replacing the two occurrences of _maybe_box_datetimelike with maybe_box_datetimelike in superset/dataframe.py directly in the installed package. It's a workaround of course but apparently it works.

@jacopofar very good!

I used @jacopofar "fixed"

@Uneasy-listening 6765 method didn't work for me. just uninstalled pandas 0.24 and switched over to 0.23.4 - fabmanager create admin... returned the following error: Was unable to import superset Error: No module named 'pandas.tseries

Is this supposed to be fixed in #6765?

I still have the same issuer with rc 0.32

Thanks jacopofar!

jacopofar's fix worked for me. Centos 7.5
/usr/local/lib/python3.6/site-packages/superset/dataframe.py

Yes!! @jacopofar
Thanks so much for your walk around! It is working now for me. Downgrade the pandas to 0.23.4 doesn't not work for me. I got the error of "Was unable to import superset Error: No module named 'pandas.compat.chainmap'"

With this walk around, you can use the latest pandas with no change at all.

@kristw
this problem is still happening of a fresh install of superset on debian.

my pip list

Package                Version
---------------------- --------
alembic                1.0.10
amqp                   2.4.2
apispec                1.3.3
asn1crypto             0.24.0
attrs                  19.1.0
Babel                  2.7.0
billiard               3.6.0.0
bleach                 3.1.0
boto3                  1.4.7
botocore               1.7.48
cchardet               2.1.4
celery                 4.3.0
certifi                2019.3.9
cffi                   1.12.3
chardet                3.0.4
click                  6.7
colorama               0.3.9
contextlib2            0.5.5
cryptography           2.6.1
defusedxml             0.6.0
docutils               0.14
et-xmlfile             1.0.1
Flask                  0.12.4
Flask-AppBuilder       2.1.3
Flask-Babel            0.12.2
Flask-Caching          1.7.1
Flask-Compress         1.4.0
Flask-JWT-Extended     3.18.2
Flask-Login            0.4.1
Flask-Migrate          2.5.2
Flask-OpenID           1.2.5
Flask-SQLAlchemy       2.4.0
Flask-WTF              0.14.2
flower                 0.9.3
future                 0.16.0
geographiclib          1.49
geopy                  1.20.0
gunicorn               19.9.0
humanize               0.5.1
idna                   2.8
ijson                  2.3
isodate                0.6.0
itsdangerous           1.1.0
jdcal                  1.4.1
Jinja2                 2.10.1
jmespath               0.9.4
jsonlines              1.2.0
jsonschema             3.0.1
kombu                  4.5.0
linear-tsv             1.1.0
Mako                   1.0.10
Markdown               3.1.1
MarkupSafe             1.1.1
marshmallow            2.19.2
marshmallow-enum       1.4.1
marshmallow-sqlalchemy 0.16.3
numpy                  1.16.3
openpyxl               2.4.11
pandas                 0.24.2
parsedatetime          2.4
pathlib2               2.3.3
pip                    19.1.1
pkg-resources          0.0.0
polyline               1.3.2
prison                 0.1.1
pycparser              2.19
pydruid                0.5.2
PyHive                 0.6.1
PyJWT                  1.7.1
pyrsistent             0.15.2
python-dateutil        2.8.0
python-editor          1.0.4
python-geohash         0.8.5
python3-openid         3.1.0
pytz                   2019.1
PyYAML                 5.1
requests               2.22.0
rfc3986                1.3.2
s3transfer             0.1.13
sasl                   0.2.1
setuptools             41.0.1
simplejson             3.16.0
six                    1.12.0
SQLAlchemy             1.3.4
SQLAlchemy-Utils       0.33.11
sqlparse               0.3.0
superset               0.28.1
tableschema            1.5.0
tabulator              1.21.0
thrift                 0.11.0
thrift-sasl            0.3.0
tornado                5.1.1
unicodecsv             0.14.1
Unidecode              1.0.23
urllib3                1.25.3
vine                   1.3.0
webencodings           0.5.1
Werkzeug               0.15.4
wheel                  0.33.4
WTForms                2.2.1
xlrd                   1.2.0

error while trying to create admin user using fab manager

Was unable to import superset Error: cannot import name '_maybe_box_datetimelike'

i'm using python 3.6

I have the same issue with Python 3.6.8 on OS X running the very latest master with pandas 0.24.3. We really should fix this.

I am not able to find dataframe.py in my following installation?

@gpinu1 look at the stack trace of the error, it should report the path of the file explicitly

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kalimuthu123 picture kalimuthu123  路  3Comments

sashank picture sashank  路  3Comments

XiaodiKong picture XiaodiKong  路  3Comments

tmccartan picture tmccartan  路  3Comments

lenguyenthedat picture lenguyenthedat  路  3Comments