-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sasview.exe cannot create the custom_config.py file #1911
Comments
Verified using 5.0.5RC2. Removing the |
Looking at comments in #1672 by @smk78 regarding some stackoverflow comments and looking again at the code I strongly suspect that the problem is that the built-in |
User reported issues with custom_config on Mac OSX. The workarround was to copy https://github.com/SasView/sasview/blob/main/src/sas/sasview/custom_config.py to ~/.sasview folder. |
Was that a permission problem as well? |
5.0.5rc2 was installed as 'All Users' from the Users normal account (not a local admin account). What is odd is that we had deleted the \config folder and the installer had recreated it, but having done so it was then unable to copy custom_config.py into the folder it had created! |
Similar situation reported by @celinedurniak on MacOS, with installed 5.0.4 (not developer build). |
agreed @rozyczko . This particular issue, failing on the line of code at the top, should almost never be invoked unless one physically removes the Can we test on the mac like I've done on the PC that removing the |
I ran into this issue last week while running v5.0.5 on Windows. The custom_config.py file was gone, but the compiled file (.pyc) was still available. I was able to get everything back up and running using the guide on the sasview FAQ site. I installed SasView for only myself. I did some debugging this morning and was able to reproduce the deletion of the custom config file by running I'm going to add more debugging messages to the exception handling in _config.py and generate an installer. Hopefully, this will give us more info than 'Could not copy default custom config.' |
Using the installer found in https://github.com/SasView/sasview/releases/tag/untagged-aea52815bcc6a9c594ab, I was able to reproduce the issue and the traceback suggests the SasView app is looking for the custom_config.py file in the base
|
The Windows installer at https://github.com/SasView/sasview/releases/tag/untagged-df5a9ed83c435b1c5119, built from the 1911-cannot-create-custom-config branch is now able to copy the custom_config file into the ~/.sasview/config/ directory on start-up and on install. Someone should check the MacOS installer to be sure that works as well. The crux of the issue - The SasView dependencies are no longer housed in a library.zip file on the same path as the executable, so the config file is one directory level different than it used to be. I did not submit this as a PR because we should find a better way to future-proof this for when our deployed file structure changes again in the future. We need some way to find the path of the executable, rather than the script currently running. |
@krzywon I tested the dmg package on Mac v 10.15.7. And I still have the issue that |
@celinedurniak Thanks for testing. Can you check your sasview.log file for an error traceback? This will help with debugging. |
14:12:39 - ERROR: Traceback (most recent call last): 14:12:39 - ERROR: Could not copy default custom config. |
This should be fixed by #2168 |
Hopefully this is indeed fixed by #2168. This is starting to bite us a lot a lot recently so to make sure we don't forget before the next release, I'm raising this to blocker for now. Note the increased incidence of this issue may be related to #2056 where the install can delete the existing custom_config (thereby generating this error on startup). That too is supposedly fixed by #2168 but needs to be checked. |
There won't be a |
bye bye custom_config.py |
As mentioned in @1672 and other places, if the
sasview.exe
program tries to copy thedefault_config.py
tocustom_config.py
in the users.sasview\config
folder it fails. Fortunately this bit of code should in principle never be needed as thecustom_config.py
file is normally installed by the installer on a clean install (barring some unusual and as yet undocumented situation) and from there on it should always be there with whatever user modifications get made. However, in the case that it accidentally gets deleted or moved, the following functionsrc/sas/_config.py
is activated:I have not yet seen any case where this ever works. In all cases I have been able to ascertain this function fails producing the error in logger.error and the program then stops with a message
Failed to execute script sasview
. Since it is so rare that this would actually be called, the easiest way to test it is to manually delete the.sasview\config\custom_config.py
file and then try running the program again.It is unlikely to be a permission problem since the program can write the the
.sasview
directory (for example when saving a custom model). Further, even when changing theHOME
directory variable so that the program tries to write to a different directory (e.g. c:\temp), it will still fail.In order to keep tickets from getting convoluted with many issues, I recommend we only add comments here related to this copying and not to any other failure to run sasview issues. Those more general issues can be added to #1672 which remains open and now contains quite a few reports.
The text was updated successfully, but these errors were encountered: