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

Trying to use on a folder with multiple subfolders, each of the folders contains one image #46

Open
Duxmir opened this issue Feb 27, 2023 · 1 comment

Comments

@Duxmir
Copy link

Duxmir commented Feb 27, 2023

I am using this:

!handprint /s google ./save/

and getting this:

+-----------------------------------------------------------------------------+
| Welcome to Handprint: HANDwritten Page RecognitIoN Test |
+-----------------------------------------------------------------------------+
Given 10 images to work on.
Will apply results of 1 service: google
Will use credentials stored in
C:\Users\sdunomir\AppData\Local\CaltechLibrary\Handprint/.
Will use up to 1 process threads.

Traceback (most recent call last):
File "C:\Users\sdunomir\Miniconda3\envs\tf2\lib\runpy.py", line 194, in run_module_as_main
return run_code(code, main_globals, None,
File "C:\Users\sdunomir\Miniconda3\envs\tf2\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\sdunomir\finished assignments for ML\handprint.exe_main
.py", line 7, in
File "C:\Users\sdunomir\Miniconda3\envs\tf2\lib\site-packages\handprint_main
.py", line 585, in console_scripts_main
plac.call(main)
File "C:\Users\sdunomir\Miniconda3\envs\tf2\lib\site-packages\plac_core.py", line 436, in call
cmd, result = parser.consume(arglist)
File "C:\Users\sdunomir\Miniconda3\envs\tf2\lib\site-packages\plac_core.py", line 287, in consume
return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File "C:\Users\sdunomir\Miniconda3\envs\tf2\lib\site-packages\handprint_main
.py", line 550, in main
alert_fatal(f'An error occurred ({ex_class.name}): {antiformat(str(ex))}')
File "C:\Users\sdunomir\Miniconda3\envs\tf2\lib\site-packages\bun\ui.py", line 101, in alert_fatal
ui.alert_fatal(text, *args, **kwargs)
File "C:\Users\sdunomir\Miniconda3\envs\tf2\lib\site-packages\bun\cli.py", line 166, in alert_fatal
self._print_or_queue(text.format(*args), style = 'fatal')
File "C:\Users\sdunomir\Miniconda3\envs\tf2\lib\site-packages\bun\cli.py", line 127, in _print_or_queue
self._console.print(text, style = style, highlight = False)
File "C:\Users\sdunomir\Miniconda3\envs\tf2\lib\site-packages\rich\console.py", line 1655, in print
self._buffer.extend(new_segments)
File "C:\Users\sdunomir\Miniconda3\envs\tf2\lib\site-packages\rich\console.py", line 854, in exit
self._exit_buffer()
File "C:\Users\sdunomir\Miniconda3\envs\tf2\lib\site-packages\rich\console.py", line 812, in _exit_buffer
self._check_buffer()
File "C:\Users\sdunomir\Miniconda3\envs\tf2\lib\site-packages\rich\console.py", line 1960, in _check_buffer
legacy_windows_render(
File "C:\Users\sdunomir\Miniconda3\envs\tf2\lib\site-packages\rich_windows_renderer.py", line 17, in legacy_windows_render
term.write_styled(text, style)
File "C:\Users\sdunomir\Miniconda3\envs\tf2\lib\site-packages\rich_win32_console.py", line 418, in write_styled
self.write_text(text)
File "C:\Users\sdunomir\Miniconda3\envs\tf2\lib\site-packages\rich_win32_console.py", line 379, in write_text
self.write(text)
File "C:\Users\sdunomir\Miniconda3\envs\tf2\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-78: character maps to

It seems like all the images are recognized, but them something seems to break...
Thanks in advance

@mhucka
Copy link
Collaborator

mhucka commented Mar 2, 2023

It looks like this must be on Windows, based on the style of the path names.

The last error suggests there's something happening involving character sets, or possibly locales. Can you tell me more about the language you use and whether any of the file names might have special characters in them?

@caltechlibrary caltechlibrary deleted a comment from ibrahim22020 Oct 31, 2024
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