twine --version TypeError: expected string or bytes-like object

120 Views Asked by At
twine --version

shows this error:

Traceback (most recent call last):
  File "C:\Users\scr\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\scr\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\scr\AppData\Local\Programs\Python\Python310\Scripts\twine.exe\__main__.py", line 7, in <module>
  File "C:\Users\scr\AppData\Local\Programs\Python\Python310\lib\site-packages\twine\__main__.py", line 33, in main
    error = cli.dispatch(sys.argv[1:])
  File "C:\Users\scr\AppData\Local\Programs\Python\Python310\lib\site-packages\twine\cli.py", line 92, in dispatch
    registered_commands = importlib_metadata.entry_points(
  File "C:\Users\scr\AppData\Local\Programs\Python\Python310\lib\site-packages\importlib_metadata\__init__.py", line 1027, in entry_points
    return SelectableGroups.load(eps).select(**params)
  File "C:\Users\scr\AppData\Local\Programs\Python\Python310\lib\site-packages\importlib_metadata\__init__.py", line 477, in load
    ordered = sorted(eps, key=by_group)
  File "C:\Users\scr\AppData\Local\Programs\Python\Python310\lib\site-packages\importlib_metadata\__init__.py", line 1024, in <genexpr>
    eps = itertools.chain.from_iterable(
  File "C:\Users\scr\AppData\Local\Programs\Python\Python310\lib\site-packages\importlib_metadata\_itertools.py", line 16, in unique_everseen
    k = key(element)
  File "C:\Users\scr\AppData\Local\Programs\Python\Python310\lib\site-packages\importlib_metadata\__init__.py", line 959, in _normalized_name
    return self._name_from_stem(stem) or super()._normalized_name
  File "C:\Users\scr\AppData\Local\Programs\Python\Python310\lib\site-packages\importlib_metadata\__init__.py", line 628, in _normalized_name
    return Prepared.normalize(self.name)
  File "C:\Users\scr\AppData\Local\Programs\Python\Python310\lib\site-packages\importlib_metadata\__init__.py", line 883, in normalize
    return re.sub(r"[-_.]+", "-", name).lower().replace('-', '_')
  File "C:\Users\scr\AppData\Local\Programs\Python\Python310\lib\re.py", line 209, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or bytes-like object

I am using Python version 3.10.2 and twine version 4.0.0.

0

There are 0 best solutions below