corpnewt / SSDTTime

SSDT/DSDT hotpatch attempts.
MIT License
1.06k stars 181 forks source link

Error: ModuleNotFoundError: No module named 'Scripts' #62

Closed zwl1619 closed 7 months ago

zwl1619 commented 7 months ago

I ran SSDTTime.bat with administrator on windows 11, there is an error:

Traceback (most recent call last):
  File "C:\Users\admin\Desktop\macos_black\EFI\OC\ACPI\SSDTTime\SSDTTime.py", line 1, in <module>
    from Scripts import downloader, dsdt, plist, reveal, run, utils
ModuleNotFoundError: No module named 'Scripts'

Script exited with error code: 1

Press [enter] to exit...
corpnewt commented 7 months ago

Hey there - are you sure you've downloaded the entire project? The Scripts folder is certainly present in this repo - and that's what it's stating it cannot find.

-CorpNewt

zwl1619 commented 7 months ago

@corpnewt
Yes, I downloaded the entire project, and there is a discussion: https://stackoverflow.com/questions/16981921/relative-imports-in-python-3

but I haven't solved this issue yet.

corpnewt commented 7 months ago

That discussion is for relative imports in the same directory - but suggests that the setup being used with SSDTTime currently should work. Your original error is stating that the Scripts folder itself cannot be found:

    from Scripts import downloader, dsdt, plist, reveal, run, utils
ModuleNotFoundError: No module named 'Scripts'

Rather than a relative import error:

ImportError: attempted relative import with no known parent package

You did mention that it was run as administrator - does it work as a standard user? I run Window 10 and simply launching via the SSDTTime.bat starter works fine locally.

-CorpNewt

zwl1619 commented 7 months ago

I reinstall python with Windows installer (64-bit) instead of Windows embeddable package (64-bit), it is ok now.