Windows-10-Lock-Screen-Image-Lookup icon indicating copy to clipboard operation
Windows-10-Lock-Screen-Image-Lookup copied to clipboard

FileNotFoundError on registry key

Open cowlinator opened this issue 3 years ago • 1 comments

I received the following error:

python application.py
Traceback (most recent call last):
  File "application.py", line 20, in <module>
    r"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Lock Screen\\Creative")
FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "application.py", line 28, in <module>
    print("{}".format(e.message))
AttributeError: 'FileNotFoundError' object has no attribute 'message'

winver 1909, build 18363.1556

I have confirmed that the registry key exists in neither HKEY_CURRENT_USER nor HKEY_LOCAL_MACHINE

cowlinator avatar May 17 '21 18:05 cowlinator

Looks like newer versions of Windows 10 have changed the file location since I wrote this script. Seems like the newest versions refer to landscapeImage instead of LandscapeAssetPath and store it in Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Creative\

Probably would need to rewrite some of the script to account for version differences. The easiest route for you might be to swap out the path with the one I've provided and see if it works.

DavidMetcalfe avatar May 17 '21 18:05 DavidMetcalfe