Giter Site home page Giter Site logo

Comments (3)

Kilo59 avatar Kilo59 commented on August 16, 2024

@IgorShcherbakov I think utf-8 is the default encoding for python.
It's possible something in your environment is overriding this.

From this SO question, it looks like you can set an environment variable PYTHONIOENCODING.

export PYTHONIOENCODING=utf8

https://stackoverflow.com/a/27066059/6304433

Let me know if that addresses the issue.

from great_expectations.

IgorShcherbakov avatar IgorShcherbakov commented on August 16, 2024

@Kilo59
print(os.getenv("PYTHONIOENCODING")) returns UTF-8

"Exception type": "UnicodeDecodeError",
"Message": "'charmap' codec can't decode byte 0x98 in position 497: character maps to <undefined>"
"Details": "Traceback (most recent call last):
File \"C:\\...\\dwh-greatexpectations\\main.py\", line 188, in get_checkpoint_result    checkpoint_result = checkpoint.run(
File \"C:\\...\\dwh-greatexpectations\\venv\\Lib\\site-packages\\great_expectations\\core\\usage_statistics\\usage_statistics.py\", line 266, in usage_statistics_wrapped_method
result = func(*args, **kwargs)
File \"C:\\...\\dwh-greatexpectations\\venv\\Lib\\site-packages\\great_expectations\\checkpoint\\checkpoint.py\", line 305, in run
self._run_validation(
File \"C:\\...\\dwh-greatexpectations\\venv\\Lib\\site-packages\\great_expectations\\checkpoint\\checkpoint.py\", line 480, in _run_validation
validator: Validator = self._validator or self.data_context.get_validator(                                              
File \"C:\\...\\dwh-greatexpectations\\venv\\Lib\\site-packages\\great_expectations\\data_context\\data_context\\abstract_data_context.py\", line 2336, in get_validator
expectation_suite = self.get_expectation_suite(
File \"C:\\...\\dwh-greatexpectations\\venv\\Lib\\site-packages\\great_expectations\\data_context\\data_context\\abstract_data_context.py\", line 3022, in get_expectation_suite
dict, self.expectations_store.get(key)
File \"C:\\...\\dwh-greatexpectations\\venv\\Lib\\site-packages\\great_expectations\\data_context\\store\\expectations_store.py\", line 210, in get
return super().get(key)  # type: ignore[return-value]
File \"C:\\...\\dwh-greatexpectations\\venv\\Lib\\site-packages\\great_expectations\\data_context\\store\\store.py\", line 207, in get
value = self._store_backend.get(self.key_to_tuple(key))
File \"C:\\...\\dwh-greatexpectations\\venv\\Lib\\site-packages\\great_expectations\\data_context\\store\\_store_backend.py\", line 123, in get
value = self._get(key, **kwargs)  
File \"C:\\...\\dwh-greatexpectations\\venv\\Lib\\site-packages\\great_expectations\\data_context\\store\\tuple_store_backend.py\", line 321, in _get
contents: str = infile.read().rstrip(\"\\n\")
File \"C:\\Python311\\Lib\\encodings\\cp1251.py\", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]          
UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 497: character maps to <undefined>"

from great_expectations.

Kilo59 avatar Kilo59 commented on August 16, 2024

@IgorShcherbakov

AFAIK, there's nowhere in our codebase where we use something other than utf-8 for encoding.
I think there's something going on with your particular environment.

If you can provide a minimal reproducible example, I'd be happy to run it and could debug from there.

from great_expectations.

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.