Skip to content
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

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

Closed
mildrabbit opened this issue Jan 28, 2019 · 19 comments
Labels
install:docker Installation - docker container v0.28

Comments

@mildrabbit
Copy link

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 [admin@fab.org]: admin@qq.com
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

@Uneasy-listening
Copy link

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

@jmarti15
Copy link

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

@mildrabbit
Copy link
Author

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

@jmarti15
Copy link

tx @Uneasy-listening !!!

This worked for me:

# pip uninstall pandas

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

# pip install pandas==0.23.4

@jmarti15
Copy link

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

tx @mildrabbit

@mildrabbit
Copy link
Author

@jmarti15 Thanks

@hajdbo
Copy link
Contributor

hajdbo commented Jan 30, 2019

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

@jacopofar
Copy link

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.

@mildrabbit
Copy link
Author

@jacopofar very good!

@kristw kristw added #question install:docker Installation - docker container v0.28 labels Feb 7, 2019
@kristw kristw closed this as completed Feb 7, 2019
haaspt added a commit to haaspt/incubator-superset that referenced this issue Feb 7, 2019
@hayou
Copy link

hayou commented Feb 17, 2019

I used @jacopofar "fixed"

@rkalasek
Copy link

@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

@cypressious
Copy link

Is this supposed to be fixed in #6765?

@lilila
Copy link

lilila commented Apr 28, 2019

I still have the same issuer with rc 0.32

@devcode2
Copy link

devcode2 commented May 7, 2019

Thanks jacopofar!

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

@Elaine66
Copy link

Elaine66 commented May 8, 2019

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.

@ShalbafZadeh
Copy link

@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

@rjurney
Copy link
Contributor

rjurney commented May 30, 2019

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.

@gpinu1
Copy link

gpinu1 commented May 31, 2019

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

@jacopofar
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
install:docker Installation - docker container v0.28
Projects
None yet
Development

No branches or pull requests