Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnicodeEncodeError: 'charmap' codec can't encode character '\u2192' #11

Open
malj390 opened this issue Jul 4, 2022 · 0 comments
Open
Assignees

Comments

@malj390
Copy link

malj390 commented Jul 4, 2022

Hi,

I came through an error that seems to be Unicode related.
I removed from the image whatever is not the axis and the numbers to avoid confusion, but still happens.
Here is the error below.

Thank you in advance,

--- Logging error in Loguru Handler #2 ---
Record was: {'elapsed': datetime.timedelta(microseconds=16049), 'exception': None, 'extra': {}, 'file': (name='plotdigitizer.py', path='C:\\Users\\user\\anaconda3\\envs\\myenv\\lib\\site-packages\\plotdigitizer\\plotdigitizer.py'), 'function': 'run', 'level': (name='DEBUG', no=10, icon='\U0001f41e'), 'line': 249, 'message': "data points ['200,0', '200,100', '0,1000'] \u2192 location on image []", 'module': 'plotdigitizer', 'name': 'plotdigitizer.plotdigitizer', 'process': (id=23404, name='MainProcess'), 'thread': (id=12196, name='MainThread'), 'time': datetime(2022, 7, 4, 11, 23, 40, 699096, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'W. Europe Summer Time'))}
Traceback (most recent call last):
  File "C:\Users\user\anaconda3\envs\myenv\lib\site-packages\loguru\_handler.py", line 177, in emit
    self._sink.write(str_record)
  File "C:\Users\user\anaconda3\envs\myenv\lib\site-packages\loguru\_file_sink.py", line 176, in write
    self._file.write(message)
  File "C:\Users\user\anaconda3\envs\myenv\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2192' in position 118: character maps to <undefined>
--- End of logging error ---
2022-07-04 11:23:40.707 | WARNING  | plotdigitizer.plotdigitizer:run:252 - Either the location of data-points are not specified or their numbers don't match with given datapoints. Asking user...
--- Logging error in Loguru Handler #2 ---
Record was: {'elapsed': datetime.timedelta(seconds=13, microseconds=679939), 'exception': None, 'extra': {}, 'file': (name='plotdigitizer.py', path='C:\\Users\\user\\anaconda3\\envs\\myenv\\lib\\site-packages\\plotdigitizer\\plotdigitizer.py'), 'function': 'transform_axis', 'level': (name='INFO', no=20, icon='\u2139\ufe0f'), 'line': 151, 'message': '[(83, 64), (83, 440), (784, 63)] \u2192 origin 83, 63', 'module': 'plotdigitizer', 'name': 'plotdigitizer.plotdigitizer', 'process': (id=23404, name='MainProcess'), 'thread': (id=12196, name='MainThread'), 'time': datetime(2022, 7, 4, 11, 23, 54, 362986, tzinfo=datetime.timezone(datetime.timedelta(seconds=7200), 'W. Europe Summer Time'))}
Traceback (most recent call last):
  File "C:\Users\user\anaconda3\envs\myenv\lib\site-packages\loguru\_handler.py", line 177, in emit
    self._sink.write(str_record)
  File "C:\Users\user\anaconda3\envs\myenv\lib\site-packages\loguru\_file_sink.py", line 176, in write
    self._file.write(message)
  File "C:\Users\user\anaconda3\envs\myenv\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2192' in position 119: character maps to <undefined>
--- End of logging error ---
Traceback (most recent call last):
  File "C:\Users\user\anaconda3\envs\myenv\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\user\anaconda3\envs\myenv\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\user\anaconda3\envs\myenv\Scripts\plotdigitizer.exe\__main__.py", line 7, in <module>
  File "C:\Users\user\anaconda3\envs\myenv\lib\site-packages\plotdigitizer\plotdigitizer.py", line 334, in main
    run(args)
  File "C:\Users\user\anaconda3\envs\myenv\lib\site-packages\plotdigitizer\plotdigitizer.py", line 269, in run
    traj = process_image(img_)
  File "C:\Users\user\anaconda3\envs\myenv\lib\site-packages\plotdigitizer\plotdigitizer.py", line 221, in process_image
    trajcolor = params_["timeseries_colors"][0]
IndexError: list index out of range
@dilawar dilawar self-assigned this Jul 8, 2022
dilawar added a commit that referenced this issue Jul 8, 2022
Loguru threw runtime exception on Windows in #11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants