Incubator-superset: Was unable to import superset Error: [Errno 20] Not a directory: '/home/superset/superset/static/assets/package.json'

Created on 25 Feb 2019  Â·  10Comments  Â·  Source: apache/incubator-superset

Superset version

release--0.3

Expected results

Actual results

fail run

Steps to reproduce

git clone https://github.com/apache/incubator-superset/
cd incubator-superset/contrib/docker
# prefix with SUPERSET_LOAD_EXAMPLES=yes to load examples:
docker-compose run --rm superset ./docker-init.sh
# you can run this command everytime you need to start superset now:
docker-compose up

in the end of docker-compose run --rm superset ./docker-init.sh after create user command:
"Was unable to import superset Error: [Errno 20] Not a directory: '/home/superset/superset/static/assets/package.json'"
then docker-compose up run failed with some node.js error.

it looks like in docker-compose.yml:
# this is needed for development, remove with SUPERSET_ENV=production
- ../../superset:/home/superset/superset
copy command didn't work, I found below superset/static path there is a alias file, my system is ubuntu 16.
and I run those well on macOX.
is there any idea about what's going on? thanks a lot

#bug .docker help-wanted inactive

Most helpful comment

A better solution is, you can create a Directory Junction by this command on Windows:
>mklink /J "assets" "../assets"
then add this folder into .gitignore

All 10 comments

Hi,

This is the issue when I tried to do the build on Windows as well. It seems the issue comes from file '/home/superset/superset/static/assets' being created as a soft link to point to ../assets (which is actual directory where all assets are there).

The soft links doesn't seem to work well on Windows. So i believe the same may be the issue in Ubuntu.

For me, the way i have overcome this issue is to remove the 'assets' file in /home/superset/superset/static/assets and copy the '/home/superset/superset/assets' directory to '/home/superset/superset/assets' and after that all my builds worked.

same problem, do you have better solution?

@kirankumarpv thank you, yesterday I do the same thing now it can run.

A better solution is, you can create a Directory Junction by this command on Windows:
>mklink /J "assets" "../assets"
then add this folder into .gitignore

6225 related

I tried both the mklink command and copy the assets directory into that didn't work. I was able to get this working is by adding this line to the docker-compose.yml file under volumes.

- ../../superset/assets:/home/superset/superset/static/assets

copy the contents of the \incubator-superset-master\supersetassets folder in incubator-superset-master\superset\staticassets and renaming the assets to assets2 file for example

A better solution is, you can create a Directory Junction by this command on Windows:
>mklink /J "assets" "../assets"
then add this folder into .gitignore

Need to switch to the directory incubator-superset\superset\static and delete or remove the assets file.
Then issue the command mklink /J "assets" "../assets" in cmd

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

I encounter a similar issue with /app/superset/static/assets/version_info.json.
https://github.com/apache/incubator-superset/issues/8804#issue-535986551

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gbrian picture gbrian  Â·  3Comments

fly-high-bj picture fly-high-bj  Â·  3Comments

sashank picture sashank  Â·  3Comments

john-bodley picture john-bodley  Â·  3Comments

lenguyenthedat picture lenguyenthedat  Â·  3Comments