cannot make cache directory on Windows 10

Description

User reported using Windows 10, synapseclient-1.9.3 on Python 3.5 (installed for the R client, synapser).

https://www.synapse.org/#!Synapse:syn5637528/discussion/threadId=6334

Loading the package fails due to the Synapse cache directory not being able to be created. My suspicion is that this line (https://github.com/Sage-Bionetworks/synapsePythonClient/blob/master/synapseclient/cache.py#L30) is not safe for Windows, as tildes are reserved for other uses (https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN#short-vs-long-names). Instead, we should use `os.path.expanduser` to get the current users home directory (https://docs.python.org/3.5/library/os.path.html).

Environment

Windows 10, synapseclient-1.9.3 on Python 3.5 (installed for the R client, synapser)

Activity

Show:
Bruce Hoff
December 5, 2019, 8:27 PM

I agree with . There may be some other problem with the path in the problem the user encountered. More investigation is needed and will be tracked under SYNR-1438.

Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Jordan Kiang

Reporter

Kenneth Daily

Labels

Validator

Kenneth Daily