GithubHelp home page GithubHelp logo

Comments (1)

Maleware avatar Maleware commented on May 18, 2024

A little research later:

we found in this file /stackable/app/lib64/python3.9/site-packages/superset/queries/saved_queries/commands/export.py in class ExportSavedQueriesCommand the function def _export where the filename is build, that the model.schema is an optional field.

However, the code doesn't handle it properly and gives the None-Type into secure_filename which then throws an exception since it can't handle the None-Type:

2024-01-30 14:53:10,852:ERROR:flask_appbuilder.api:normalize() argument 2 must be str, not None                                                                          
Traceback (most recent call last):                                                                                                                                       
  File "/stackable/app/lib64/python3.9/site-packages/flask_appbuilder/api/__init__.py", line 110, in wraps                                                               
    return f(self, *args, **kwargs)                                                                                                                                      
  File "/stackable/app/lib64/python3.9/site-packages/superset/views/base_api.py", line 127, in wraps                                                                     
    raise ex                                                                                                                                                             
  File "/stackable/app/lib64/python3.9/site-packages/superset/views/base_api.py", line 121, in wraps                                                                     
    duration, response = time_function(f, self, *args, **kwargs)                                                                                                         
  File "/stackable/app/lib64/python3.9/site-packages/superset/utils/core.py", line 1526, in time_function                                                                
    response = func(*args, **kwargs)                                                                                                                                     
  File "/stackable/app/lib64/python3.9/site-packages/flask_appbuilder/api/__init__.py", line 182, in wraps                                                               
    return f(self, *args, **kwargs)                                                                                                                                      
  File "/stackable/app/lib64/python3.9/site-packages/superset/queries/saved_queries/api.py", line 271, in export                                                         
    for file_name, file_content in ExportSavedQueriesCommand(                                                                                                            
  File "/stackable/app/lib64/python3.9/site-packages/superset/commands/export/models.py", line 59, in run                                                                
    for file_name, file_content in self._export(model, self.export_related):                                                                                             
  File "/stackable/app/lib64/python3.9/site-packages/superset/queries/saved_queries/commands/export.py", line 45, in _export                                             
    schema_slug = model.schema                                                                                                                                           
  File "/stackable/app/lib64/python3.9/site-packages/werkzeug/utils.py", line 218, in secure_filename                                                                    
    filename = unicodedata.normalize("NFKD", filename)                                                                                                                   
TypeError: normalize() argument 2 must be str, not None

from superset.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.