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

[BUG] CLI: local variable 'x_' referenced before assignment #74

Closed
PalmtopTiger opened this issue Jul 26, 2021 · 2 comments
Closed

[BUG] CLI: local variable 'x_' referenced before assignment #74

PalmtopTiger opened this issue Jul 26, 2021 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@PalmtopTiger
Copy link

Describe the bug
UnboundLocalError: local variable 'x_' referenced before assignment

To Reproduce
normalizer WISHGEN.TXT
WISHGEN.TXT

Expected behavior
The program does not crash.

Logs

Unable to identify originating encoding for "WISHGEN.TXT". Maybe try increasing maximum amount of chaos.
Traceback (most recent call last):
  File "c:\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Python39\Scripts\normalizer.exe\__main__.py", line 7, in <module>
  File "c:\python39\lib\site-packages\charset_normalizer\cli\normalizer.py", line 192, in cli_detect
    ] if args.alternatives else x_[0].__dict__,
UnboundLocalError: local variable 'x_' referenced before assignment

Desktop (please complete the following information):

  • Windows 10 x64
  • Python 3.9.6 x64
  • Package version: 2.0.3
@PalmtopTiger PalmtopTiger added bug Something isn't working help wanted Extra attention is needed labels Jul 26, 2021
@Ousret
Copy link
Collaborator

Ousret commented Jul 26, 2021

Hi @PalmtopTiger

Thanks for submitting this. Fortunately, I have found it a bit sooner, will be fixed in the next minor #70

I am closing this, feel free to test the patch from dev-master.

Regards,

@Ousret Ousret closed this as completed Jul 26, 2021
@Ousret
Copy link
Collaborator

Ousret commented Jul 30, 2021

Fixed in version 2.0.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants