We're Hiring!

Dropbox error

Having a problem deploying OMERO? Please ask new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

The OMERO.server installation documentation begins here and you can find OMERO.web deployment documentation here.

Dropbox error

Postby oscshall » Tue Oct 26, 2010 2:27 pm

I've set up and configured Dropbox, and I'm getting an error when I place a file into a watched directory. The error looks like this:

2010-10-19 10:35:43,445 INFO [ omero.remote] (Dummy-6 ) Meth: SingleUserMonitorClient.fsEventHappened
2010-10-19 10:35:43,446 INFO [ fsclient.fsDropBoxMonitorClient] (Dummy-6 ) EVENT_RECORD::Cookie::1287498943.45::Batch::1
2010-10-19 10:35:43,446 INFO [ fsclient.fsDropBoxMonitorClient] (Dummy-6 ) EVENT_RECORD::Cookie::1287498943.45::Create::/OMERO/DropBox/shall/2330_morainelakepanorama_2560x1024.jpg
2010-10-19 10:35:43,487 INFO [ omero.remote] (Dummy-6 ) Rslt: None
2010-10-19 10:36:38,726 INFO [ fsclient.fsDropBoxMonitorClient] (Thread-5 ) Processing 1 events (1 ids). 0 remaining
2010-10-19 10:36:38,726 INFO [ fsclient.fsDropBoxMonitorClient] (Thread-5 ) Getting filesets on : set(['/OMERO/DropBox/shall/2330_morainelakepanorama_2560x1024.jpg'])
2010-10-19 10:36:38,926 ERROR [ fsclient.fsDropBoxMonitorClient] (Thread-5 ) Failed to get filesets
Traceback (most recent call last):
File "/home/shall/OMERO.server-Beta-4.2.0/lib/python/fsDropBoxMonitorClient.py", line 444, in callback
fileSets = self.getUsedFiles(list(ids), readers=self.readers)
File "/home/shall/OMERO.server-Beta-4.2.0/lib/python/omero/util/decorators.py", line 28, in handler
return func(*args, **kwargs)
File "/home/shall/OMERO.server-Beta-4.2.0/lib/python/omero/util/import_candidates.py", line 61, in as_dictionary
as_stdout(path, readers=readers)
File "/home/shall/OMERO.server-Beta-4.2.0/lib/python/omero/util/import_candidates.py", line 37, in as_stdout
cli.invoke(["import", "-f"]+path)
File "/home/shall/OMERO.server-Beta-4.2.0/lib/python/omero/cli.py", line 702, in invoke
stop = self.onecmd(line, previous_args)
File "/home/shall/OMERO.server-Beta-4.2.0/lib/python/omero/cli.py", line 771, in onecmd
self.execute(line, previous_args)
File "/home/shall/OMERO.server-Beta-4.2.0/lib/python/omero/cli.py", line 851, in execute
args.func(args)
File "/home/shall/OMERO.server-Beta-4.2.0/lib/python/omero/plugins/import.py", line 74, in importer
args.args.remove(out)
AttributeError: 'Namespace' object has no attribute 'args'

From this I can tell that Dropbox has found the file, since the file's name is in the error, but cannot properly import it. Here is my Dropbox configuration in etc/grid/templates.xml

<property name="omero.fs.importUsers" value="root;shall"/>
<property name="omero.fs.watchDir" value="/OMERO/DropBox/root;/OMERO/DropBox/shall"/>
<property name="omero.fs.eventTypes" value="Creation,Modification;Creation,Modification"/>
<property name="omero.fs.pathMode" value="Follow;Follow"/>
<property name="omero.fs.whitelist" value=";"/>
<property name="omero.fs.blacklist" value=";"/>
<property name="omero.fs.timeout" value="0.0;0.0"/>
<property name="omero.fs.blockSize" value="0;0"/>
<property name="omero.fs.ignoreSysFiles" value="True;True"/>
<property name="omero.fs.ignoreDirEvents" value="True;True"/>
<property name="omero.fs.dirImportWait" value="5;5"/>
<property name="omero.fs.readers" value=";"/>
<property name="omero.fs.importArgs" value=";"/>

and the permissions on the Dropbox folders

[root@omero-test DropBox]# ls -lh
total 16K
drwxrwxrwx 2 apache apache 4.0K Sep 23 10:04 root
drwxr-xr-x 2 shall shall 4.0K Oct 26 10:17 shall

Both /OMERO and /OMERO/DropBox are owned by apache.
oscshall
 
Posts: 8
Joined: Thu Sep 09, 2010 5:32 pm

Re: Dropbox error

Postby jmoore » Tue Oct 26, 2010 3:17 pm

This is a bug in 4.2.0. I've added a ticket (http://trac.openmicroscopy.org.uk/omero/ticket/3192) and the fix will be available in the upcoming 4.2.1 release. If you'd like to fix it yourself, you'll need to edit the file: "lib/python/omero/plugins/import.py" and remove lines 75 and 78:

Code: Select all
@@ -72,10 +72,8 @@ class ImportControl(BaseControl):
         err = args.errs

         if out:
-            args.args.remove(out)
             out = open(out, "w")
         if err:
-            args.args.remove(err)
             err = open(err, "w")

         login_args = []


Sorry for the inconvience.
~Josh.
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: Dropbox error

Postby hajaalin » Thu Oct 28, 2010 1:44 pm

Hi Josh,

I have the same problem. I tried your fix (except that in my editor the lines to remove are 74 and 77):

Code: Select all
       
if out:
#            args.args.remove(out)
            out = open(out, "w")
        if err:
#            args.args.remove(err)
            err = open(err, "w")


Now it crashed like this:
----- DropBox.log ----
2010-10-28 16:14:47,249 INFO [ fsclient.fsDropBoxMonitorClient] (Thread-3 ) Processing 1 events (1 ids). 0 remaining
2010-10-28 16:14:47,249 INFO [ fsclient.fsDropBoxMonitorClient] (Thread-3 ) Getting filesets on : set(['/DropBox/hajaalin/image--L0000--S00--U07--V00--J21--E00--O00--X02--Y02--T0000--Z00--C00.ome.tif'])
2010-10-28 16:14:47,855 WARNI [ stdout] (Thread-3 ) Previously logged in to localhost as root
2010-10-28 16:14:47,855 WARNI [ stdout] (Thread-3 ) Server: [localhost]
2010-10-28 16:14:47,868 ERROR [ fsclient.fsDropBoxMonitorClient] (Thread-3 ) Failed to get filesets
Traceback (most recent call last):
File "/opt/OMERO.server-Beta-4.2.0/lib/python/fsDropBoxMonitorClient.py", line 444, in callback
fileSets = self.getUsedFiles(list(ids), readers=self.readers)
File "/opt/OMERO.server-Beta-4.2.0/lib/python/omero/util/decorators.py", line 28, in handler
return func(*args, **kwargs)
File "/opt/OMERO.server-Beta-4.2.0/lib/python/omero/util/import_candidates.py", line 61, in as_dictionary
as_stdout(path, readers=readers)
File "/opt/OMERO.server-Beta-4.2.0/lib/python/omero/util/import_candidates.py", line 37, in as_stdout
cli.invoke(["import", "-f"]+path)
File "/opt/OMERO.server-Beta-4.2.0/lib/python/omero/cli.py", line 702, in invoke
stop = self.onecmd(line, previous_args)
File "/opt/OMERO.server-Beta-4.2.0/lib/python/omero/cli.py", line 771, in onecmd
self.execute(line, previous_args)
File "/opt/OMERO.server-Beta-4.2.0/lib/python/omero/cli.py", line 851, in execute
args.func(args)
File "/opt/OMERO.server-Beta-4.2.0/lib/python/omero/plugins/import.py", line 85, in importer
client = self.ctx.conn(args)
File "/opt/OMERO.server-Beta-4.2.0/lib/python/omero/cli.py", line 1013, in conn
self.controls["sessions"].login(args)
File "/opt/OMERO.server-Beta-4.2.0/lib/python/omero/plugins/sessions.py", line 199, in login
if not server: server, name = self._get_server(store)
File "/opt/OMERO.server-Beta-4.2.0/lib/python/omero/plugins/sessions.py", line 408, in _get_server
rv = self.ctx.input("Server: [%s]" % defserver)
File "/opt/OMERO.server-Beta-4.2.0/lib/python/omero/cli.py", line 343, in input
rv = raw_input(prompt)
EOFError: EOF when reading a line
------------------------

In etc/grid/templates.xml I have changed these:
<property name="omero.fs.importUsers" value="hajaalin"/>
<property name="omero.fs.watchDir" value="/DropBox/hajaalin"/>

And the file permissions look like this:
[omero@hj-sandbox OMERO.server-Beta-4.2.0]$ ls -lrt / | grep DropBox
drwxr-xr-x 3 omero users 4096 Oct 27 15:23 DropBox

[omero@hj-sandbox OMERO.server-Beta-4.2.0]$ ls -lrt /DropBox/
total 4
drwxr-xr-x 2 hajaalin users 4096 Oct 28 16:13 hajaalin

[omero@hj-sandbox OMERO.server-Beta-4.2.0]$ ls -lrt /DropBox/hajaalin/
total 284
-rw-r--r-- 1 hajaalin users 284472 May 18 14:36 image--L0000--S00--U07--V00--J21--E00--O00--X02--Y02--T0000--Z00--C00.ome.tif

What might be the cause?

Regards,
Harri
hajaalin
 
Posts: 6
Joined: Thu Oct 21, 2010 7:18 am

Re: Dropbox error

Postby jmoore » Thu Oct 28, 2010 2:23 pm

Hi Harri,

it's another bug: http://trac.openmicroscopy.org.uk/omero/ticket/3200 for which I just attached an as yet untested patch.

We'll go through DropBox before release and try to find any other issues. If you'd prefer to wait for 4.2.1 we certainly understand, but otherwise certainly appreciate your testing and can let you know when we have what we think is a working version.

Cheers,
~Josh.
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: Dropbox error

Postby hajaalin » Wed Dec 01, 2010 11:39 am

This works now with version 4.2.1, thanks!

Harri
hajaalin
 
Posts: 6
Joined: Thu Oct 21, 2010 7:18 am


Return to Installation and Deployment

Who is online

Users browsing this forum: No registered users and 1 guest