Open tashrifbillah opened 4 years ago
Can you try the following on
ipython
and let me know what you get:from tempfile import mkstemp f, name= mkstemp() print(f, name)
44 /var/tmp/pbs.1337292.pbs/tmpsunczqkv
Your previously mentioned solution of changing tmp folder works just fine
cd dMRIharmonization/lib Then, check the occurrences of /tmp/: grep /tmp py sed -i "s+/tmp/+/new_folder/+g" py
44 /var/tmp/pbs.1337292.pbs/tmpsunczqkv
I didn't know you can have write access to /var/tmp
. Good!
Your previously mentioned solution of changing tmp folder works just fine
I provided you a way around, but not the most desired one. Let's say you want to git pull
after you affect those changes. Then, you would have to discard the changes one by one until you can pull recent changes of our software. On the other hand, if I write to the system default directory other than /tmp/
, then you won't have to affect those changes in first place. So, to make it more manageable and standard, I shall write to system default temp directory.
Please watch for updates. Thanks!
Hint:
Replace configFile= f'/tmp/harm_config_{getpid()}.ini'
with follows:
from tempfile import gettempdir
configFile= pjoin(gettempdir(), harm_config_{getpid()}.ini')
Hi @fedemoro,
To eliminate permission issue regarding writing to
/tmp/
directory you were facing because of this line:I would like to devise a solution for you that should also contribute to the impeccability of our software.
Can you try the following on
ipython
and let me know what you get: