Replies: 1 comment
-
Hi there, would you be able to send me a sample CSV with the encoding. Let me take a look and see what I can do. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, i love this. But i have one problem i was hoping you could help me with. I am based in Norway. Many of my csv is encoded in a way that dont work with your code.
Is there a way to make a workaround that allows the streamlit app to read all encodings, or at least to encode my csv in a way that makes it possible for the app to use it?
This is the error i am getting:
File "/Users/madsommundsen/Desktop/Graferoginfo/Home.py", line 541, in
DATA, sample_data_overview = load_data(UPLOADED_FILE)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/madsommundsen/anaconda3/envs/venv/lib/python3.11/site-packages/streamlit/runtime/caching/cache_utils.py", line 194, in wrapper
return cached_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/madsommundsen/anaconda3/envs/venv/lib/python3.11/site-packages/streamlit/runtime/caching/cache_utils.py", line 223, in call
return self._get_or_create_cached_value(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/madsommundsen/anaconda3/envs/venv/lib/python3.11/site-packages/streamlit/runtime/caching/cache_utils.py", line 248, in _get_or_create_cached_value
return self._handle_cache_miss(cache, value_key, func_args, func_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/madsommundsen/anaconda3/envs/venv/lib/python3.11/site-packages/streamlit/runtime/caching/cache_utils.py", line 302, in _handle_cache_miss
computed_value = self._info.func(*func_args, **func_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/madsommundsen/Desktop/Graferoginfo/Home.py", line 82, in load_data
data = pd.read_csv(UPLOADED_FILE)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/madsommundsen/anaconda3/envs/venv/lib/python3.11/site-packages/pandas/util/_decorators.py", line 211, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/madsommundsen/anaconda3/envs/venv/lib/python3.11/site-packages/pandas/util/_decorators.py", line 331, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/madsommundsen/anaconda3/envs/venv/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 950, in read_csv
return _read(filepath_or_buffer, kwds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/madsommundsen/anaconda3/envs/venv/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 605, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/madsommundsen/anaconda3/envs/venv/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 1442, in init
self._engine = self._make_engine(f, self.engine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/madsommundsen/anaconda3/envs/venv/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 1753, in _make_engine
return mapping[engine](f, **self.options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/madsommundsen/anaconda3/envs/venv/lib/python3.11/site-packages/pandas/io/parsers/c_parser_wrapper.py", line 79, in init
self._reader = parsers.TextReader(src, **kwds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pandas/_libs/parsers.pyx", line 547, in pandas._libs.parsers.TextReader.cinit
File "pandas/_libs/parsers.pyx", line 636, in pandas._libs.parsers.TextReader._get_header
File "pandas/_libs/parsers.pyx", line 852, in pandas._libs.parsers.TextReader._tokenize_rows
File "pandas/_libs/parsers.pyx", line 1965, in pandas._libs.parsers.raise_parser_error
Beta Was this translation helpful? Give feedback.
All reactions