Closed jilavsky closed 2 years ago
WHY? IS? USAXS? looking in the backup directory path /local/usaxs
? Should be using ~
as root for this (~/.local/share/intake/
where the soft link in that directory works properly!).
Fixed this with a workaround (remove the softlinks and copy the ~/.ipython/profile_bluesky/startup/databroker_catalogs.yml
file into both the /local/usaxs/.local/share/intake
and ~/.local/share/intake
directories)
It starts now with no additional errors. There is a known warning from the intake package; ignore that now since it's for the databroker developers to resolve.
Note: The search path can be printed with these commands:
import databroker
databroker.catalog_search_path()
and the result (can't copy from the session now) shows the first item in the path is the /local/usaxs/.local/share/intake
directory.
Q: How to change that to what was expected (~/.local/share/intake
)?
Interesting search. The intake
package uses the appdirs.user_data_dir()
function for this. Here's something important:
Typical user data directories are:
Mac OS X: ~/Library/Application Support/<AppName>
Unix: ~/.local/share/<AppName> # or in $XDG_DATA_HOME, if defined
Win XP (not roaming): C:\Documents and Settings\<username>\Application Data\<AppAuthor>\<AppName>
Win XP (roaming): C:\Documents and Settings\<username>\Local Settings\Application Data\<AppAuthor>\<AppName>
Win 7 (not roaming): C:\Users\<username>\AppData\Local\<AppAuthor>\<AppName>
Win 7 (roaming): C:\Users\<username>\AppData\Roaming\<AppAuthor>\<AppName>```
Checking the usaxs
environment variables, there is a XDG_DATA_HOME
environment variable and it is set to /local/share/.local/share
. From this, appdirs
appends /intake
since that is the "application" being configured.
Note: None of this is the responsibility of bluesky. Wonder how and why this environment variable is set? @jilavsky - any ideas?
Aha! It's set in /etc/profile.d/zzaps.sh
. Pesky OS and sysAdmins!
BTW: This is the same setup that creates the .loglogin
files. That file was last modified in May 2019 but the edits look like they are from 2012. We can probably remove the env var in our setup.
I confirm that will fix this issue:
unset XDG_DATA_HOME
Just added that to the end of ~/.bashrc
This will be applied to new shells.
Reading this only increased level of my confusion. I am not responsible for any of those settings. May be Kevin?
Nope. APS IT by the initials of JLM (namely Joe Midlock).
XDG is where some system software stores local, user-dependent, configuration settings. Probably, Joe was reacting to problems where writing this info to $HOME/.local/share
was complicated by NFS at the APS. His modifications redirect XDG to the /local/${USER}
directory, knowing that APS IT always provides this local storage with the excess partition space on the hard disk.
Setting up instrument, checking all starts...
Sounds like some databroker issue - was move to network location fished?