question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Running "docker-compose up" fails to compile successfully (Error on importing STR_NA_VALUES from pandas)

See original GitHub issue

Running docker-compose up on version 1.3.2 (and 1.4.0rc3) fails to compile.

I understand that we are meant to use the non-dev build (i.e. docker-compose -f docker-compose-non-dev.yml up) in order to use the superset app when running via docker, but there are also times where we may want to make modifications which would require the docker-compose up command to be run?

How to reproduce the bug

  1. Go to release on the github, download the 1.3.2 zip (https://github.com/apache/superset/archive/refs/tags/1.3.2.zip) (edit: also happens on 1.4.0rc3, you can try it with that too)
  2. Extract the folder
  3. Enter the superset-1.3.2 folder in a terminal
  4. Run docker-compose up

Expected results

I would expect to be presented with the Superset login screen / welcome page when viewing on browser. image

I would expect it to compile successfully without error.

Actual results

Presented with stack trace of error when viewing in browser. image

The docker logs say this, or similar in most of the containers (app, worker, worker-beat):
ImportError: cannot import name 'STR_NA_VALUES' from 'pandas.io.parsers' (/usr/local/lib/python3.8/site-packages/pandas/io/parsers/__init__.py) in most containers.

More full logs here: https://0bin.net/paste/QaIy4jLo#n1g3eqjy3UCcxVj6OZ2VLYge32s-nN2aWqLNy7XCTNE

Environment

(please complete the following information):

  • docker: Docker version 20.10.12, build e91ed57
  • browser type and version: N/A (any / all), tested on ChromeVersion 97.0.4692.71 (Official Build) (64-bit)
  • superset version: 1.3.2 / Superset 0.0.0dev (according to running command in docker container)
  • python version: Python 3.8.12 (according to running command in docker container)
  • node.js version: OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "node": executable file not found in $PATH: unknown (according to running command in docker container)
  • any feature flags active: Unsure / Only default

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven’t found one similar.

Additional context

Here is the pip freeze on the superset app docker container: https://0bin.net/paste/aKKgpHJ3#uAUB7QBQyt7wpPXn6d3CPtjoFsnMZI0+oF7VymnAwbO

I see that pandas is on 1.3.4 but in the requirements base.txt it is 1.2.2, so I am not sure how it upgraded itself ( I haven’t checked if other packages are correct or not)

Might be related to this? https://github.com/apache/superset/pull/16400

Other user had an error here similar: https://github.com/apache/superset/issues/17333 but I didn’t understand how they fixed it.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
jensengcommented, Feb 7, 2022

Just ran into this trying to develop against 1.3, but I was able to resolve it by running docker build -t apache/superset:latest-dev ., which made sure I had the right versions of things in the docker image. An alternative workaround might be to find a suitable version here and pull it.

docker-compose.yml is configured to use apache/superset:latest-dev, which presumably is built from the master branch. So by building locally you can ensure you have the right versions of things for your branch.

1reaction
Alviecommented, Mar 9, 2022

The pull request from @ravimakhija #16400 does seem to fix it, if I set it to use pandas._libs.parsers instead of pandas.io.parsers in the superset/config.py

No need of this, docker build -t apache/superset:latest-dev . takes care of it too.

Oh wow that seems like a better option, thank you 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Example code]-Getting error on running docker-compose up
I am trying to run my python code through docker-compose. It is not a flask app so I didn't provide a port number...
Read more >
Docker build for numpy , pandas giving error - Stack Overflow
One last question- my dockerfile is named dockerfile. How do I add tag to it. By default it adds latest tag. But I...
Read more >
Debugging ImportError and ModuleNotFoundErrors in your ...
Solution. Either install all your code with pip install , or make sure it's all in the same directory. Step 4. python - ......
Read more >
Python module not found while run from `docker-compose` (ok ...
In a nutshell, importing a python module that's built from src does not work when it's invoked from docker-compose 's command: key, however...
Read more >
Using Docker for Data Science - Robert Myles McDonnell
We will then include a database connection and set all that up. ... As before, we can run docker-compose build and docker-compose run...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found