ome / omero-py

Python project containing Ice remoting code for OMERO
https://www.openmicroscopy.org/omero
GNU General Public License v2.0
20 stars 31 forks source link

OMERO CLI fails if a file ~/omero exists #210

Open manics opened 4 years ago

manics commented 4 years ago
[test@1f99c18b86c3 ~]$ pwd
/home/test

[test@1f99c18b86c3 ~]$ ls

[test@1f99c18b86c3 ~]$ ln -s /opt/omero/server/venv3/bin/omero

[test@1f99c18b86c3 ~]$ ./omero login
WARNING:omero.util.TempFileManager:Invalid tmp dir: /home/test/omero/tmp
Traceback (most recent call last):
  File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/util/temp_files.py", line 178, in tmpdir
    self.create(target)
  File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/util/temp_files.py", line 246, in create
    dir.makedirs(0o700)
  File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero_ext/path.py", line 1254, in makedirs
    os.makedirs(self, mode)
  File "/usr/lib64/python3.6/os.py", line 220, in makedirs
    mkdir(name, mode)
NotADirectoryError: [Errno 20] Not a directory: path('/home/test/omero/tmp')
Could not access session dir: /home/test/omero/sessions
joshmoore commented 4 years ago

The use of ~/omero has bothered me for some time. I wonder if it's worth using this as a chance to move to something more platform-appropriate: ~/.config/omero + $TMPDIR/$USER-omero + ..., etc.

manics commented 4 years ago

What do you think of using https://pypi.org/project/appdirs/ ?

joshmoore commented 4 years ago
  • Project officially classified as Stable which is important for inclusion in other distros such as ActivePython.
  • First of several incremental releases to catch up on maintenance.

;)