You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/07/16 13:29:28 UTC

[GitHub] [incubator-superset] syazwan0913 opened a new issue #10341: Error when uploading CSV file

syazwan0913 opened a new issue #10341:
URL: https://github.com/apache/incubator-superset/issues/10341


   A clear and concise description of what the bug is.
   
   ### Expected results
   
   CSV file uploaded into database
   
   ### Actual results
   
   Got error when uploading CSV file
   
   #### Screenshots
   
   ```
   Traceback (most recent call last):
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2464, in __call__
       return self.wsgi_app(environ, start_response)
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2450, in wsgi_app
       response = self.handle_exception(e)
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1867, in handle_exception
       reraise(exc_type, exc_value, tb)
     File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
       raise value
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app
       response = self.full_dispatch_request()
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request
       rv = self.handle_user_exception(e)
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception
       reraise(exc_type, exc_value, tb)
     File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
       raise value
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
       rv = self.dispatch_request()
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
       return self.view_functions[rule.endpoint](**req.view_args)
     File "/usr/local/lib/python3.6/site-packages/flask_appbuilder/security/decorators.py", line 109, in wraps
       return f(self, *args, **kwargs)
     File "/usr/local/lib/python3.6/site-packages/flask_appbuilder/views.py", line 94, in this_form_post
       response = self.form_post(form)
     File "/app/superset/views/database/views.py", line 141, in form_post
       delete=False,
     File "/usr/local/lib/python3.6/tempfile.py", line 551, in NamedTemporaryFile
       (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type)
     File "/usr/local/lib/python3.6/tempfile.py", line 262, in _mkstemp_inner
       fd = _os.open(file, flags, 0o600)
   FileNotFoundError: [Errno 2] No such file or directory: '/app/superset/app/static/uploads/tmpgzxvi893.csv'
   ```
   
   #### How to reproduce the bug
   
   1. Go to '...'
   2. Click on '....'
   3. Scroll down to '....'
   4. See error
   
   ### Environment
   
   (please complete the following information):
   
   - First installation using Docker
   - superset version: `master`
   - python version: `based on master branch`
   - node.js version: `based on master branch`
   - npm version: `based on master branch`
   
   ### Checklist
   
   Make sure these boxes are checked 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
   
   Add any other context about the problem here.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] rayzor65 commented on issue #10341: Error when uploading CSV file

Posted by GitBox <gi...@apache.org>.
rayzor65 commented on issue #10341:
URL: https://github.com/apache/incubator-superset/issues/10341#issuecomment-722019928


   I managed to get past this issue by creating a new folder in my dockerfile (`RUN mkdir /csvs`) then updating `superset_config.py`
   ```
   # superset_config.py
   UPLOAD_FOLDER = "/csvs/"
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] willbarrett commented on issue #10341: Error when uploading CSV file

Posted by GitBox <gi...@apache.org>.
willbarrett commented on issue #10341:
URL: https://github.com/apache/incubator-superset/issues/10341#issuecomment-683873861


   I haven't gotten a few minutes yet :)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] syazwan0913 commented on issue #10341: Error when uploading CSV file

Posted by GitBox <gi...@apache.org>.
syazwan0913 commented on issue #10341:
URL: https://github.com/apache/incubator-superset/issues/10341#issuecomment-659728456


   I tested by uploading the same file on other superset version which is `0.34.0` and it is uploaded


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] reenarosid edited a comment on issue #10341: Error when uploading CSV file

Posted by GitBox <gi...@apache.org>.
reenarosid edited a comment on issue #10341:
URL: https://github.com/apache/incubator-superset/issues/10341#issuecomment-660547458


   > I tested by uploading the same file on other superset version which is `0.34.0` in same environment and it is uploaded. What does it mean by your statement here?
   > 
   > > Looks like your file is not present at the location from where you are trying to pick it up.
   
   This issue occurs in the default (master) version


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] syazwan0913 commented on issue #10341: Error when uploading CSV file

Posted by GitBox <gi...@apache.org>.
syazwan0913 commented on issue #10341:
URL: https://github.com/apache/incubator-superset/issues/10341#issuecomment-671684675


   @reenarosid Okay got it. Thank you


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] reenarosid removed a comment on issue #10341: Error when uploading CSV file

Posted by GitBox <gi...@apache.org>.
reenarosid removed a comment on issue #10341:
URL: https://github.com/apache/incubator-superset/issues/10341#issuecomment-660547458


   > I tested by uploading the same file on other superset version which is `0.34.0` in same environment and it is uploaded. What does it mean by your statement here?
   > 
   > > Looks like your file is not present at the location from where you are trying to pick it up.
   
   This issue occurs in the default (master) version


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] syazwan0913 commented on issue #10341: Error when uploading CSV file

Posted by GitBox <gi...@apache.org>.
syazwan0913 commented on issue #10341:
URL: https://github.com/apache/incubator-superset/issues/10341#issuecomment-683354143


   @willbarrett What is the status of this?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] reenarosid commented on issue #10341: Error when uploading CSV file

Posted by GitBox <gi...@apache.org>.
reenarosid commented on issue #10341:
URL: https://github.com/apache/incubator-superset/issues/10341#issuecomment-660941810


   Cause:  Insufficient privilege, which doesn't allow a file creation in the Docker container environment.
   
   Fix: giving it a root privilege
   
   Please add user: root:root in your docker-compose.yml to fix the issue.
   
   
     superset:
       env_file: docker/.env
       build: *superset-build
       container_name: superset_app
       command: ["flask", "run", "-p", "8088", "--with-threads", "--reload", "--debugger", "--host=0.0.0.0"]
       restart: unless-stopped
       ports:
         - 8088:8088
       user: root:root  # make this change  
       depends_on: *superset-depends-on
       volumes: *superset-volumes
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] syazwan0913 edited a comment on issue #10341: Error when uploading CSV file

Posted by GitBox <gi...@apache.org>.
syazwan0913 edited a comment on issue #10341:
URL: https://github.com/apache/incubator-superset/issues/10341#issuecomment-659728456


   I tested by uploading the same file on other superset version which is `0.34.0` in same environment and it is uploaded. What does it mean by your statement here?
   
   > Looks like your file is not present at the location from where you are trying to pick it up.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] issue-label-bot[bot] commented on issue #10341: Error when uploading CSV file

Posted by GitBox <gi...@apache.org>.
issue-label-bot[bot] commented on issue #10341:
URL: https://github.com/apache/incubator-superset/issues/10341#issuecomment-659412293


   Issue-Label Bot is automatically applying the label `#bug` to this issue, with a confidence of 0.96. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback! 
   
    Links: [app homepage](https://github.com/marketplace/issue-label-bot), [dashboard](https://mlbot.net/data/apache/incubator-superset) and [code](https://github.com/hamelsmu/MLapp) for this bot.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] reenarosid edited a comment on issue #10341: Error when uploading CSV file

Posted by GitBox <gi...@apache.org>.
reenarosid edited a comment on issue #10341:
URL: https://github.com/apache/incubator-superset/issues/10341#issuecomment-660941810


   Cause:  Insufficient privilege, which doesn't allow a file creation in the Docker container environment.
   
   Fix: giving it a root privilege
   
   Please add user: root:root in your docker-compose.yml to fix the issue.
   
   
     superset:
       env_file: docker/.env
       build: *superset-build
       container_name: superset_app
       command: ["flask", "run", "-p", "8088", "--with-threads", "--reload", "--debugger", "--host=0.0.0.0"]
       restart: unless-stopped
       ports:
         - 8088:8088
       user: root:root  # add this change  
       depends_on: *superset-depends-on
       volumes: *superset-volumes
   
   
   
   
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] reenarosid edited a comment on issue #10341: Error when uploading CSV file

Posted by GitBox <gi...@apache.org>.
reenarosid edited a comment on issue #10341:
URL: https://github.com/apache/incubator-superset/issues/10341#issuecomment-660941810


   Cause:  Insufficient privilege, which doesn't allow a file creation in the Docker container environment.
   
   Fix: giving it a root privilege
   
   Please add user: root:root in your docker-compose.yml to fix the issue.
   
   
     superset:
       env_file: docker/.env
       build: *superset-build
       container_name: superset_app
       command: ["flask", "run", "-p", "8088", "--with-threads", "--reload", "--debugger", "--host=0.0.0.0"]
       restart: unless-stopped
       ports:
         - 8088:8088
       user: root:root  # make this change  
       depends_on: *superset-depends-on
       volumes: *superset-volumes
   
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] syazwan0913 edited a comment on issue #10341: Error when uploading CSV file

Posted by GitBox <gi...@apache.org>.
syazwan0913 edited a comment on issue #10341:
URL: https://github.com/apache/incubator-superset/issues/10341#issuecomment-659728456


   I tested by uploading the same file on other superset version which is `0.34.0` in same environment and it is uploaded. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] gaurav1999 commented on issue #10341: Error when uploading CSV file

Posted by GitBox <gi...@apache.org>.
gaurav1999 commented on issue #10341:
URL: https://github.com/apache/incubator-superset/issues/10341#issuecomment-659537758


   Looks like your file is not present at the location from where you are trying to pick it up.
   
   ```FileNotFoundError: [Errno 2] No such file or directory: '/app/superset/app/static/uploads/tmpgzxvi893.csv'```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] willbarrett commented on issue #10341: Error when uploading CSV file

Posted by GitBox <gi...@apache.org>.
willbarrett commented on issue #10341:
URL: https://github.com/apache/incubator-superset/issues/10341#issuecomment-675039960


   It should be noted that the solution recommended by @reenarosid should only be used in development environments - if you're using the same dockerfile or docker-compose setup in a hosted environment, it's a questionable idea to give the application root privileges. We can likely add read/write permissions on the appropriate folder in the docker build to avoid the necessity of running as root. I'll take a look into that when I get a few minutes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] reenarosid commented on issue #10341: Error when uploading CSV file

Posted by GitBox <gi...@apache.org>.
reenarosid commented on issue #10341:
URL: https://github.com/apache/incubator-superset/issues/10341#issuecomment-660547458


   > I tested by uploading the same file on other superset version which is `0.34.0` in same environment and it is uploaded. What does it mean by your statement here?
   > 
   > > Looks like your file is not present at the location from where you are trying to pick it up.
   
   This issue occurs in the default (master)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org