Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

winregistry version change compatability issue. #23

Closed
DuncanM-XR opened this issue Dec 10, 2024 · 2 comments · Fixed by #24
Closed

winregistry version change compatability issue. #23

DuncanM-XR opened this issue Dec 10, 2024 · 2 comments · Fixed by #24

Comments

@DuncanM-XR
Copy link

It looks like when winregsitry has been updated from 1.1.1 to 2.0.0+ The import used in py-machineid here has become broken.

Trying the import in console with winregistry 1.1.1:

Python 3.12.7 | packaged by conda-forge | (main, Oct  4 2024, 15:47:54) [MSC v.1941 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from winregistry import WinRegistry
>>>
>>> import machineid
>>> machineid.id()
'41a48b3f-a696-4b8f-aa6a-3126feb1b2a5'

Trying the import in console with winregistry 2.0.1:

Python 3.12.7 | packaged by conda-forge | (main, Oct  4 2024, 15:47:54) [MSC v.1941 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from winregistry import WinRegistry
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'WinRegistry' from 'winregistry' (C:\Users\USERNAME\anaconda3\envs\debug_env\Lib\site-packages\winregistry.py)
>>>
>>> import machineid
>>> machineid.id()
'C3E5DCE8-76B5-B3A3-2E6B-13E152D43228'

I believe the change in return value of machineid.id() is due to this import issue, whereby the code path that would previously be acquiring the ID from the registry will now fall back to the powershell approach. This can result in machines reporting a different ID for the fingerprint when activating a license through keygen.

@ezekg
Copy link
Member

ezekg commented Dec 10, 2024

Can you provide a PR that updates the dependency? For now, lock your version to Winregistry v1.

@DuncanM-XR
Copy link
Author

Yeah I've pinned my version of winregistry to 1.1.1 for the time being. If I get time I'll put together a PR.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants