KBNLresearch / iromlab

Loader software for automated imaging of optical media with Nimbie disc robot
Apache License 2.0
31 stars 5 forks source link

Locating site package dir fails on Windows 11 #112

Closed bitsgalore closed 2 months ago

bitsgalore commented 2 months ago

Config script mistakenly assumes user site package directory instead of global one!

In this case:

Which is used here:

        if packageDir.lower() in sitePackageDirGlobal.lower():
            sitePackageDir = sitePackageDirGlobal
        elif packageDir.lower() in sitePackageDirUser.lower():
            sitePackageDir = sitePackageDirUser

The first test fails, and the second one succeeds, so the config script assumes the user dir is the correct one. BUT in reality this directory does not exist, whereas Iromlab got installed in the global dir! (Iromlab was installed by running pip in command prompt windows that was launched as local admin).

Results are same if config script is run as local admin.

bitsgalore commented 2 months ago

This happened because I accidentally cloned the source repo to the exact same location the script used to write its config!