You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C:\Users\scr> twine
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 91, 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
The text was updated successfully, but these errors were encountered:
jaxram
changed the title
Twine not working
Twine command not working in windows
Jun 16, 2022
How did you install Twine? What version of Python are you using?
Take a look at #774, which is a similar issue, and includes some commands that might be useful for debugging. I'm guessing you've installed Twine into a Python environment that includes many other packages, and one of those packages has invalid metadata, causing importlib_metadata.entry_points() to fail. If that's the case, you should be able to resolve the issue by a) removing the invalid packages or b) using an isolated virtual environment for Twine, either manually with python3 -m venv or pipx.
The text was updated successfully, but these errors were encountered: