V. 3.10 and 3.14: makepy.py ValueError: invalid literal for int() with base 16: '0.0.0'

A very first hello,

and many thanks for all your efforts!

Just starting makepy.py without any paramters, like
MyFullPath\python.exe MyFullPath\makepy.py
results to
ValueError: invalid literal for int() with base 16: ‘0.0.0’

Any hints are highly appreciated!
PythonFox

Since you are not sharing your code with us I’ll have to guess…

The error is tell you that 0.0.0 is not a valid integer.

Do you see that string in your code?
Or did you type that in when prompted?

If so change it to 0.

I’m not using any code. Just starting makepy.py via the Windows 11 command prompt. I want t get the list of all registered type librarie. Same problem with parameter -d.

The trouble is that we don’t know what makepy.py is or where it came from :slight_smile:

We can guess at things, but without more information about how you’re running into trouble we can’t actually help.

So far with the information given, we can guess that makepy.py looks like

int('0.0.0', 16)

but that’s probably not right :slight_smile:

makepy.py is code. Did someone provide you with this script? They may be able to provide troubleshooting help.

makepy.py is an utility tool which is installed via
GitHub - mhammond/pywin32: Python for Windows (pywin32) Extensions · GitHub

(pywin32 is the Python for Win32 extensions, which provides access to many of the Windows APIs from Python, including COM support.)
in folder
Lib\site-packages\win32com\client\makepy.py

pywin32/com/win32com/client/makepy.py at main · mhammond/pywin32 · GitHub

Used for Windows COM/ActiveX support, importing (registered) type libraries.

The bug isn’t reported yet. Do you have a GitHub account? If you do, you can open an issue or discussion about it.

Also what does the “V. 3.10 and 3.14” in the title mean?

Can you paste your traceback? That is, the block of output before the error message with the header Traceback (most recent call last):

1. V. 3.10 and 3.14: The Python versions I tried.

2. Traceback (most recent call last):

File "MyPath\Lib\site-packages\win32com\client\makepy.py", line 449, in 
rc = main()
File "MyPath\Lib\site-packages\win32com\client\makepy.py", line 421, in main
rc = selecttlb.SelectTlb()
File "MyPath\Lib\site-packages\win32com\client\selecttlb.py", line 172, in SelectTlb
i.minor = int(i.minor, 16)
~~~^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 16: '0.0.0'

3. There seems to be an dependency which type libraries are installed. I have one PC without that problem, but my main development PCs show all that error message. On one I installed 3.14 fresh, together with pip install pywin32. Same problem.

Will try to debug makepy.py and report (GitHub).

Based on the comments in the source file, I think there’s something wrong with some of your registry entries, which you can edit by typing regedit into the Win + R dialog. I’m not familiar with the library, but I can point you to start reading here.