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 2021/07/14 19:59:26 UTC

[GitHub] [superset] fuomag9 opened a new issue #15692: "ERROR: Failed to fetch schemas allowed for csv upload in this database!" when trying to upload CSV

fuomag9 opened a new issue #15692:
URL: https://github.com/apache/superset/issues/15692


   "ERROR: Failed to fetch schemas allowed for csv upload in this database!" when trying to upload CSV
   
   ### Expected results
   
   No error should happen when uploading CSV to the default docker-compose database. 
   
   ### Actual results
   
   I receive an error stating `ERROR: Failed to fetch schemas allowed for csv upload in this database! Please contact your Superset Admin!`
   
   Terminal error:
   
   ```
   192.168.165.1 - - [14/Jul/2021:19:51:12 +0000] "GET /csvtodatabaseview/form HTTP/1.1" 200 27340 "http://192.168.165.128:8088/databaseview/list/?pageIndex=0&sortColumn=changed_on_delta_humanized&sortOrder=desc" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0"
   superset_app            | can only concatenate str (not "list") to str
   superset_app            | Traceback (most recent call last):
   superset_app            |   File "/app/superset/views/core.py", line 3121, in schemas_access_for_csv_upload
   superset_app            |     schemas_allowed = database.get_schema_access_for_csv_upload()
   superset_app            |   File "/app/superset/models/core.py", line 675, in get_schema_access_for_csv_upload
   superset_app            |     allowed_databases += extra_allowed_databases
   superset_app            | TypeError: can only concatenate str (not "list") to str
   superset_app            | 2021-07-14 19:51:12,677:ERROR:superset.views.core:can only concatenate str (not "list") to str
   superset_app            | Traceback (most recent call last):
   superset_app            |   File "/app/superset/views/core.py", line 3121, in schemas_access_for_csv_upload
   superset_app            |     schemas_allowed = database.get_schema_access_for_csv_upload()
   superset_app            |   File "/app/superset/models/core.py", line 675, in get_schema_access_for_csv_upload
   superset_app            |     allowed_databases += extra_allowed_databases
   superset_app            | TypeError: can only concatenate str (not "list") to str
   ```
   
   #### Screenshots
   
   ![image](https://user-images.githubusercontent.com/1580624/125684249-4dc971ae-f535-42c2-b720-10cd3a32803c.png)
   
   
   #### How to reproduce the bug
   
   1. Enable `data upload` for the default database
   2. Go to http://IP:8088/csvtodatabaseview/form
   
   ### Environment
   
   (please complete the following information):
   
   - superset version: `superset version`
   - python version: `python --version`
   - node.js version: `node -v`
   
   See https://github.com/apache/superset/blob/070f0b6cb2a1c3385bc2a7ed2448aa7eb1251666/docker-compose-non-dev.yml for the used versions since I ran this with docker-compose
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar.


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] myheartsgoon commented on issue #15692: "ERROR: Failed to fetch schemas allowed for csv upload in this database!" when trying to upload CSV

Posted by GitBox <gi...@apache.org>.
myheartsgoon commented on issue #15692:
URL: https://github.com/apache/superset/issues/15692#issuecomment-881907266


   Currently I fixed this issue temporarily by adding below code to the funtion `get_schema_access_for_csv_upload ` on backend and rebuilt the image.
   ```
   from ast import literal_eval
   allowed_databases = literal_eval(allowed_databases)
   ```
   
   full code of function `get_schema_access_for_csv_upload` now.
   ```python
       def get_schema_access_for_csv_upload(  # pylint: disable=invalid-name
           self,
       ) -> List[str]:
           allowed_databases = self.get_extra().get("schemas_allowed_for_csv_upload", [])
           from ast import literal_eval
           allowed_databases = literal_eval(allowed_databases)
           if hasattr(g, "user"):
               extra_allowed_databases = config["ALLOWED_USER_CSV_SCHEMA_FUNC"](
                   self, g.user
               )
               allowed_databases += extra_allowed_databases
           return sorted(set(allowed_databases))
   ```
   
   ![image](https://user-images.githubusercontent.com/24839228/126039760-56ceeab5-9f37-40d6-aa84-4df4bdeacea7.png)
   
   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] myheartsgoon edited a comment on issue #15692: "ERROR: Failed to fetch schemas allowed for csv upload in this database!" when trying to upload CSV

Posted by GitBox <gi...@apache.org>.
myheartsgoon edited a comment on issue #15692:
URL: https://github.com/apache/superset/issues/15692#issuecomment-881907266


   Currently I fixed this issue temporarily by adding below code to the funtion `get_schema_access_for_csv_upload ` on backend and rebuilt the image.
   ```
   from ast import literal_eval
   allowed_databases = literal_eval(allowed_databases)
   ```
   
   full code of function `get_schema_access_for_csv_upload` now.
   ```python
       def get_schema_access_for_csv_upload(  # pylint: disable=invalid-name
           self,
       ) -> List[str]:
           allowed_databases = self.get_extra().get("schemas_allowed_for_csv_upload", [])
           from ast import literal_eval
           allowed_databases = literal_eval(allowed_databases)
           if hasattr(g, "user"):
               extra_allowed_databases = config["ALLOWED_USER_CSV_SCHEMA_FUNC"](
                   self, g.user
               )
               allowed_databases += extra_allowed_databases
           return sorted(set(allowed_databases))
   ```
   
   ![image](https://user-images.githubusercontent.com/24839228/126040172-c287dae0-0247-49c8-873a-d301b7be22ac.png)
   
   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] fuomag9 commented on issue #15692: "ERROR: Failed to fetch schemas allowed for csv upload in this database!" when trying to upload CSV

Posted by GitBox <gi...@apache.org>.
fuomag9 commented on issue #15692:
URL: https://github.com/apache/superset/issues/15692#issuecomment-884816064


   > > > ```
   > > >     def get_schema_access_for_csv_upload(  # pylint: disable=invalid-name
   > > >         self,
   > > >     ) -> List[str]:
   > > >         allowed_databases = self.get_extra().get("schemas_allowed_for_csv_upload", [])
   > > >         from ast import literal_eval
   > > >         allowed_databases = literal_eval(allowed_databases)
   > > >         if hasattr(g, "user"):
   > > >             extra_allowed_databases = config["ALLOWED_USER_CSV_SCHEMA_FUNC"](
   > > >                 self, g.user
   > > >             )
   > > >             allowed_databases += extra_allowed_databases
   > > >         return sorted(set(allowed_databases))
   > > > ```
   > > 
   > > 
   > > I can attest that did made indeed the error disappear and the upload work
   > 
   > Hi @fuomag9, how did you did this? i tried to recompile docker image changing the described function but apparently broke something because now the container is not starting.
   
   This is what I'd do and it builds, but it seems that the "fix" does not work anymore or I'm messing something up (even though I made that work some time ago!)
   
   `git clone https://github.com/apache/superset`
   substitute the `get_schema_access_for_csv_upload` function in ./superset/models/core.py
   `sed -i "s_apache/superset:latest-dev_superset:localbeta_g" docker-compose-non-dev.yml`
   `sudo docker build -t superset:localbeta .`
   `sudo docker-compose -f docker-compose-non-dev.yml 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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] fuomag9 commented on issue #15692: "ERROR: Failed to fetch schemas allowed for csv upload in this database!" when trying to upload CSV

Posted by GitBox <gi...@apache.org>.
fuomag9 commented on issue #15692:
URL: https://github.com/apache/superset/issues/15692#issuecomment-880954089


   > Created #15716 for the issue reported for the schemas_allowed_for_csv_upload, thanks 
   > 
   > 
   > 
   > For the CSV upload itself, do you have anything set in the schemas_allowed_for_csv_upload when seeing this error? 
   
   Nothing more than the first mandatory modal opening for allowing the csv upload (I'm not actually writing anything there by myself assuming #15716 gets fixed, by default it's blank for me)


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] SoryEscobar commented on issue #15692: "ERROR: Failed to fetch schemas allowed for csv upload in this database!" when trying to upload CSV

Posted by GitBox <gi...@apache.org>.
SoryEscobar commented on issue #15692:
URL: https://github.com/apache/superset/issues/15692#issuecomment-884622236


   > > ```
   > >     def get_schema_access_for_csv_upload(  # pylint: disable=invalid-name
   > >         self,
   > >     ) -> List[str]:
   > >         allowed_databases = self.get_extra().get("schemas_allowed_for_csv_upload", [])
   > >         from ast import literal_eval
   > >         allowed_databases = literal_eval(allowed_databases)
   > >         if hasattr(g, "user"):
   > >             extra_allowed_databases = config["ALLOWED_USER_CSV_SCHEMA_FUNC"](
   > >                 self, g.user
   > >             )
   > >             allowed_databases += extra_allowed_databases
   > >         return sorted(set(allowed_databases))
   > > ```
   > 
   > I can attest that did made indeed the error disappear and the upload work
   
   Hi @fuomag9, how did you did this? i tried to recompile docker image changing the described function but apparently broke something because now the container is not starting.


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] fuomag9 edited a comment on issue #15692: "ERROR: Failed to fetch schemas allowed for csv upload in this database!" when trying to upload CSV

Posted by GitBox <gi...@apache.org>.
fuomag9 edited a comment on issue #15692:
URL: https://github.com/apache/superset/issues/15692#issuecomment-884816064


   > > > ```
   > > >     def get_schema_access_for_csv_upload(  # pylint: disable=invalid-name
   > > >         self,
   > > >     ) -> List[str]:
   > > >         allowed_databases = self.get_extra().get("schemas_allowed_for_csv_upload", [])
   > > >         from ast import literal_eval
   > > >         allowed_databases = literal_eval(allowed_databases)
   > > >         if hasattr(g, "user"):
   > > >             extra_allowed_databases = config["ALLOWED_USER_CSV_SCHEMA_FUNC"](
   > > >                 self, g.user
   > > >             )
   > > >             allowed_databases += extra_allowed_databases
   > > >         return sorted(set(allowed_databases))
   > > > ```
   > > 
   > > 
   > > I can attest that did made indeed the error disappear and the upload work
   > 
   > Hi @fuomag9, how did you did this? i tried to recompile docker image changing the described function but apparently broke something because now the container is not starting.
   
   This is what I'd do and it builds, but it seems that the "fix" does not work anymore or I'm messing something up (even though I made that work some time ago!)
   
   1. `git clone https://github.com/apache/superset`
   1.  Substitute the `get_schema_access_for_csv_upload` function in ./superset/models/core.py
   1. `sed -i "s_apache/superset:latest-dev_superset:localbeta_g" docker-compose-non-dev.yml`
   1. `sudo docker build -t superset:localbeta .`
   1. `sudo docker-compose -f docker-compose-non-dev.yml 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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] zhengr edited a comment on issue #15692: "ERROR: Failed to fetch schemas allowed for csv upload in this database!" when trying to upload CSV

Posted by GitBox <gi...@apache.org>.
zhengr edited a comment on issue #15692:
URL: https://github.com/apache/superset/issues/15692#issuecomment-885398674


   You can copy the modified core.py file to **superset_app** container directly, it works for me.
   
   docker cp superset/models/core.py  (container-id):/app/superset/models/


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] danzinger commented on issue #15692: "ERROR: Failed to fetch schemas allowed for csv upload in this database!" when trying to upload CSV

Posted by GitBox <gi...@apache.org>.
danzinger commented on issue #15692:
URL: https://github.com/apache/superset/issues/15692#issuecomment-880216346


   Same problem here. Also the `Edit Database` UI has changed and is not consistent with the [tutorial](https://superset.apache.org/docs/creating-charts-dashboards/exploring-data) anymore.


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] yousoph commented on issue #15692: "ERROR: Failed to fetch schemas allowed for csv upload in this database!" when trying to upload CSV

Posted by GitBox <gi...@apache.org>.
yousoph commented on issue #15692:
URL: https://github.com/apache/superset/issues/15692#issuecomment-880951863


   Created #15716 for the issue reported for the schemas_allowed_for_csv_upload, thanks 
   
   For the CSV upload itself, do you have anything set in the schemas_allowed_for_csv_upload when seeing this error? 


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] fuomag9 commented on issue #15692: "ERROR: Failed to fetch schemas allowed for csv upload in this database!" when trying to upload CSV

Posted by GitBox <gi...@apache.org>.
fuomag9 commented on issue #15692:
URL: https://github.com/apache/superset/issues/15692#issuecomment-881962866


   > ```python
   >     ) -> List[str]:
   > ```
   
   I can attest that did made indeed the error disappear and the upload work


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] fuomag9 commented on issue #15692: "ERROR: Failed to fetch schemas allowed for csv upload in this database!" when trying to upload CSV

Posted by GitBox <gi...@apache.org>.
fuomag9 commented on issue #15692:
URL: https://github.com/apache/superset/issues/15692#issuecomment-880262427


   > Edit: The value of the field `schemas_allowed_for_csv_upload` changes anytime the modal is opened again. There seem to be a problem with escaping the value which may ruin the datatype of the value whend parsed, resulting in the problem.
   > 
   > 
   > 
   > Value on first opening: `"[]"`
   > 
   > Value on second opening: `"\"[]\""`
   > 
   > Value on third opening: `"\"\\\"[]\\\"\""`
   > 
   > 
   
   I've noticed this as well, every time it seems to increase in terms of expansion (but the issue still remains even if blank)


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] fuomag9 closed issue #15692: "ERROR: Failed to fetch schemas allowed for csv upload in this database!" when trying to upload CSV

Posted by GitBox <gi...@apache.org>.
fuomag9 closed issue #15692:
URL: https://github.com/apache/superset/issues/15692


   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] myheartsgoon commented on issue #15692: "ERROR: Failed to fetch schemas allowed for csv upload in this database!" when trying to upload CSV

Posted by GitBox <gi...@apache.org>.
myheartsgoon commented on issue #15692:
URL: https://github.com/apache/superset/issues/15692#issuecomment-881862635


   I also encounter the same problem when using latest 1.2.0. 
   Below is my setting: 
   ![image](https://user-images.githubusercontent.com/24839228/126030862-b408c785-38c4-4abf-8e47-45d744ec61fa.png)
   
   Below is the error in the superset logs when opening the "Upload CSV" page:
   
   ![image](https://user-images.githubusercontent.com/24839228/126031264-e4e3d166-4017-4f96-883f-6aa66e071647.png)
   
   
   
   I checked the put request that sent to the backend for enabling csv upload: `https://{superset_url}/api/v1/database/13`
   In the request payload, the parameter "schemas_allowed_for_csv_upload" in `extra` was incorrectly set. It will cause `schemas_allowed_for_csv_upload` gets json parsed into string type instead of list type (source code in `superset.models.core.Database.get_schema_access_for_csv_upload` function). 
   
   
   `extra` in the request payload in my case:
   `"{\"metadata_params\":{},\"engine_params\":{},\"schemas_allowed_for_csv_upload\":\"[\\\"superset_upload\\\"]\"}"`
   
   and after json parsing :
   
   `>>> json.loads("{\"metadata_params\":{},\"engine_params\":{},\"schemas_allowed_for_csv_upload\":\"[\\\"superset_upload\\\"]\"}")
   {'metadata_params': {}, 'engine_params': {}, 'schemas_allowed_for_csv_upload': '["superset_upload"]'}`
   
   You can see `schemas_allowed_for_csv_upload` became a string instead of list. And it will raise the error `TypeError: can only concatenate str (not "list") to str`
   
   ![image](https://user-images.githubusercontent.com/24839228/126027778-912a8ffb-3dc9-4f8c-9dbd-4dca7d3870ec.png)
   
   ```python 
       def get_schema_access_for_csv_upload(  # pylint: disable=invalid-name
           self,
       ) -> List[str]:
           allowed_databases = self.get_extra().get("schemas_allowed_for_csv_upload", [])
           if hasattr(g, "user"):
               extra_allowed_databases = config["ALLOWED_USER_CSV_SCHEMA_FUNC"](
                   self, g.user
               )
               allowed_databases += extra_allowed_databases
           return sorted(set(allowed_databases))
   ```


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] danzinger edited a comment on issue #15692: "ERROR: Failed to fetch schemas allowed for csv upload in this database!" when trying to upload CSV

Posted by GitBox <gi...@apache.org>.
danzinger edited a comment on issue #15692:
URL: https://github.com/apache/superset/issues/15692#issuecomment-880216346


   Same problem here. Also the `Edit Database` UI has changed and is not consistent with the [tutorial](https://superset.apache.org/docs/creating-charts-dashboards/exploring-data) anymore.
   
   Edit: The value of the field `schemas_allowed_for_csv_upload` changes anytime the modal is opened again. There seem to be a problem with escaping the value which may ruin the datatype of the value whend parsed, resulting in the problem.
   
   Value on first opening: `"[]"`
   Value on second opening: `"\"[]\""`
   Value on third opening: `"\"\\\"[]\\\"\""`
   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] junlincc commented on issue #15692: "ERROR: Failed to fetch schemas allowed for csv upload in this database!" when trying to upload CSV

Posted by GitBox <gi...@apache.org>.
junlincc commented on issue #15692:
URL: https://github.com/apache/superset/issues/15692#issuecomment-880260659


   `superset version` means latest master? @danzinger 
   
   https://www.youtube.com/watch?v=G7kVeONipsQ mind double checking if this tutorial work for 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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] zhengr commented on issue #15692: "ERROR: Failed to fetch schemas allowed for csv upload in this database!" when trying to upload CSV

Posted by GitBox <gi...@apache.org>.
zhengr commented on issue #15692:
URL: https://github.com/apache/superset/issues/15692#issuecomment-885398674


   You can copy the modified core.py file to **<superset_app>** container directly, it works for me.
   
   eg,
   docker cp superset/models/core.py **<container-id>**:/app/superset/models/


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] fuomag9 commented on issue #15692: "ERROR: Failed to fetch schemas allowed for csv upload in this database!" when trying to upload CSV

Posted by GitBox <gi...@apache.org>.
fuomag9 commented on issue #15692:
URL: https://github.com/apache/superset/issues/15692#issuecomment-913243735


   Fixed with the latest superset:latest-dev


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] danzinger commented on issue #15692: "ERROR: Failed to fetch schemas allowed for csv upload in this database!" when trying to upload CSV

Posted by GitBox <gi...@apache.org>.
danzinger commented on issue #15692:
URL: https://github.com/apache/superset/issues/15692#issuecomment-880639102


   I am not the OP, but for me this happens on version `0.999.0dev` which was installed by `docker-compose` when following [the official install with docker guide](https://superset.apache.org/docs/installation/installing-superset-using-docker-compose). Did not see that I wasn't on the latest stable release then. Shouldn't the latest master be pulled by `docker-compose`?
   
   docker Version: `20.10.7` 
   docker-compose version: `1.29.2`


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] junlincc edited a comment on issue #15692: "ERROR: Failed to fetch schemas allowed for csv upload in this database!" when trying to upload CSV

Posted by GitBox <gi...@apache.org>.
junlincc edited a comment on issue #15692:
URL: https://github.com/apache/superset/issues/15692#issuecomment-880260659


   `superset version` means latest master? 
   https://www.youtube.com/watch?v=G7kVeONipsQ mind double checking if this tutorial work for 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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] sriram1204 commented on issue #15692: "ERROR: Failed to fetch schemas allowed for csv upload in this database!" when trying to upload CSV

Posted by GitBox <gi...@apache.org>.
sriram1204 commented on issue #15692:
URL: https://github.com/apache/superset/issues/15692#issuecomment-996609815


   is this fixed in the latest code?


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] [superset] fuomag9 edited a comment on issue #15692: "ERROR: Failed to fetch schemas allowed for csv upload in this database!" when trying to upload CSV

Posted by GitBox <gi...@apache.org>.
fuomag9 edited a comment on issue #15692:
URL: https://github.com/apache/superset/issues/15692#issuecomment-881962866


   > ```
   >     def get_schema_access_for_csv_upload(  # pylint: disable=invalid-name
   >         self,
   >     ) -> List[str]:
   >         allowed_databases = self.get_extra().get("schemas_allowed_for_csv_upload", [])
   >         from ast import literal_eval
   >         allowed_databases = literal_eval(allowed_databases)
   >         if hasattr(g, "user"):
   >             extra_allowed_databases = config["ALLOWED_USER_CSV_SCHEMA_FUNC"](
   >                 self, g.user
   >             )
   >             allowed_databases += extra_allowed_databases
   >         return sorted(set(allowed_databases))
   > ```
   
   
   I can attest that did made indeed the error disappear and the upload work


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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