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
Closed

Comments

@mildrabbit
Copy link

@mildrabbit mildrabbit commented Jan 28, 2019

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

This comment has been minimized.

Copy link

@Uneasy-listening Uneasy-listening commented Jan 28, 2019

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

This comment has been minimized.

Copy link

@jmarti15 jmarti15 commented Jan 28, 2019

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

@mildrabbit

This comment has been minimized.

Copy link
Author

@mildrabbit mildrabbit commented Jan 28, 2019

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

@jmarti15

This comment has been minimized.

Copy link

@jmarti15 jmarti15 commented Jan 28, 2019

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

This comment has been minimized.

Copy link

@jmarti15 jmarti15 commented Jan 28, 2019

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

tx @mildrabbit

@mildrabbit

This comment has been minimized.

Copy link
Author

@mildrabbit mildrabbit commented Jan 28, 2019

@jmarti15 Thanks

@hajdbo

This comment has been minimized.

Copy link
Contributor

@hajdbo hajdbo commented Jan 30, 2019

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

@jacopofar

This comment has been minimized.

Copy link

@jacopofar jacopofar commented Jan 30, 2019

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

This comment has been minimized.

Copy link
Author

@mildrabbit mildrabbit commented Jan 30, 2019

@jacopofar very good!

@kristw kristw closed this Feb 7, 2019
haaspt added a commit to haaspt/incubator-superset that referenced this issue Feb 7, 2019
@hayou

This comment has been minimized.

Copy link

@hayou hayou commented Feb 17, 2019

I used @jacopofar "fixed"

@rkalasek

This comment has been minimized.

Copy link

@rkalasek rkalasek commented Mar 11, 2019

@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

This comment has been minimized.

Copy link

@cypressious cypressious commented Mar 18, 2019

Is this supposed to be fixed in #6765?

@lilila

This comment has been minimized.

Copy link

@lilila lilila commented Apr 28, 2019

I still have the same issuer with rc 0.32

@devcode2

This comment has been minimized.

Copy link

@devcode2 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

This comment has been minimized.

Copy link

@Elaine66 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

This comment has been minimized.

Copy link

@ShalbafZadeh ShalbafZadeh commented May 28, 2019

@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

This comment has been minimized.

Copy link
Contributor

@rjurney 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.

rjurney added a commit to rjurney/incubator-superset that referenced this issue May 30, 2019
@gpinu1

This comment has been minimized.

Copy link

@gpinu1 gpinu1 commented May 31, 2019

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

@jacopofar

This comment has been minimized.

Copy link

@jacopofar jacopofar commented Jun 3, 2019

@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
Projects
None yet
You can’t perform that action at this time.