Git Product home page Git Product logo

Comments (10)

dosubot avatar dosubot commented on July 18, 2024 2

Hey @TommyLeung-gj! I'm here to help you with the issue you're experiencing with Superset 4.0.1. I'm a bot that can assist you with bug fixes, answer your questions, and guide you on becoming a contributor. Let's dive into resolving the problem together!

To resolve the issue of Chinese characters and numbers being garbled when exporting query results to a CSV file in Superset 4.0.1, you need to ensure that the CSV file is encoded in UTF-8. The df_to_escaped_csv function in the superset/utils/csv.py file should be called with the appropriate encoding settings.

Here is the relevant part of the code with the necessary modification:

csv_data = df_to_escaped_csv(df, index=False, encoding='utf-8', **config["CSV_EXPORT"])

Ensure that the encoding='utf-8' parameter is included in the call to df_to_escaped_csv. This will help in correctly encoding Chinese characters and numbers in the exported CSV file [1][2].

To continue talking to Dosu, mention @dosu.

from superset.

Habeeb556 avatar Habeeb556 commented on July 18, 2024 1

The issue has been resolved by downgrading the package with the following command: pip install Werkzeug==2.3.8.

from superset.

bionexit avatar bionexit commented on July 18, 2024 1

The issue has been resolved by downgrading the package with the following command: pip install Werkzeug==2.3.8.

I down grade the Werkzeug as 2.3.8 but no luck. What's your encoding option?
My is following

CSV_EXPORT = {"encoding": "utf-8-sig"}

Yes, this encoding. But did you face the same problem with VERSION 2.1.3 or 3.1.3? Also I got a Chinese characters not with the English.

It's worked after i reload the cerely service. Thanks a lot bro.

from superset.

rusackas avatar rusackas commented on July 18, 2024

Related issue linked above ^^^

Might even be considered a duplicate, really, but they seem kind of unique.

from superset.

TommyLeung-gj avatar TommyLeung-gj commented on July 18, 2024

No ,It still doesn't work after I changed encoding = "utf-8"

from superset.

TommyLeung-gj avatar TommyLeung-gj commented on July 18, 2024

maybe there is something wrong in the process of async query , the celery or redis resultbackend cache

from superset.

bionexit avatar bionexit commented on July 18, 2024

+1

from superset.

Habeeb556 avatar Habeeb556 commented on July 18, 2024

+2

Having the same issue with VERSION 4.0.1 even VERSION 2.1.3 WORKING FINE WITH THESE PARAMETER CONFIG.

from superset.

bionexit avatar bionexit commented on July 18, 2024

The issue has been resolved by downgrading the package with the following command: pip install Werkzeug==2.3.8.

I down grade the Werkzeug as 2.3.8 but no luck.
What's your encoding option?

My is following

CSV_EXPORT = {"encoding": "utf-8-sig"}

from superset.

Habeeb556 avatar Habeeb556 commented on July 18, 2024

The issue has been resolved by downgrading the package with the following command: pip install Werkzeug==2.3.8.

I down grade the Werkzeug as 2.3.8 but no luck. What's your encoding option?

My is following

CSV_EXPORT = {"encoding": "utf-8-sig"}

Yes, this encoding. But did you face the same problem with VERSION 2.1.3 or 3.1.3? Also I got a Chinese characters not with the English.

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.