Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #4749 (closed)

Opened 13 years ago

Closed 13 years ago

BUG: DropBox fails when importing a folder of files.

Reported by: cblackburn Owned by: jamoore
Priority: major Milestone: OMERO-Beta4.3
Component: OmeroFs Version: n.a.
Keywords: n.a. Cc: jamoore
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2011-05-19 (12)

Description

See attached log.

Individual bmp and jpg files import okay. A folder containing several of each fails. This was on Ubuntu 9.10 and happens with pyinotify 0.8.6 and 0.9.1.

Attachments (1)

DropBox.log (41.5 KB) - added by cblackburn 13 years ago.

Download all attachments as: .zip

Change History (16)

Changed 13 years ago by cblackburn

comment:1 Changed 13 years ago by cblackburn

  • Owner set to cblackburn
  • Remaining Time set to 1
  • Status changed from new to accepted

comment:2 Changed 13 years ago by jburel

  • Sprint changed from 2011-03-24 (8) to 2011-04-07 (9)

Moved from sprint 2011-03-24 (8)

comment:3 Changed 13 years ago by cblackburn

  • Owner cblackburn deleted
  • Status changed from accepted to new

comment:4 Changed 13 years ago by cblackburn

Some time spent investigating has shown this fault occurs with as few as two files in a directory. Rollbacks to 4.2 still seem to show the fault on my Ubuntu 9.10 installation.

comment:5 Changed 13 years ago by cblackburn

  • Owner set to cblackburn

comment:6 Changed 13 years ago by cblackburn

  • Status changed from new to accepted

comment:7 Changed 13 years ago by cxallan

  • Sprint changed from 2011-04-07 (9) to 2011-04-21 (10)

Moved from sprint 2011-04-07 (9)

comment:8 Changed 13 years ago by cblackburn

  • Owner cblackburn deleted
  • Status changed from accepted to new

comment:9 Changed 13 years ago by cblackburn

  • Owner set to cblackburn
  • Remaining Time changed from 1 to 0.5

comment:10 Changed 13 years ago by jburel

  • Sprint changed from 2011-04-21 (10) to 2011-05-05 (11)

Moved from sprint 2011-04-21 (10)

comment:11 Changed 13 years ago by jburel

  • Sprint changed from 2011-05-05 (11) to 2011-05-19 (12)

Moved from sprint 2011-05-05 (11)

comment:12 Changed 13 years ago by jmoore

  • Owner changed from cblackburn to jmoore
  • Remaining Time changed from 0.5 to 0.1
  • Status changed from new to accepted

comment:13 Changed 13 years ago by jmoore

This is not a concurrency issue per-se, but a problem with default arguments (which are static) being mutable:

~/git/components/tools $ git diff OmeroPy/src/omero/cli.py
diff --git a/components/tools/OmeroPy/src/omero/cli.py b/components/tools/OmeroPy/src/omero/cli.py
index f598195..95a8315 100755
--- a/components/tools/OmeroPy/src/omero/cli.py
+++ b/components/tools/OmeroPy/src/omero/cli.py
@@ -226,10 +226,14 @@ class Context:
 
     """
 
-    def __init__(self, controls = {}, params = {}, prog = sys.argv[0]):
-        self.event = get_event(name="CLI")
-        self.params = {}

Other examples:

~/git/components/tools $ git grep __init__ | grep \{\}
OmeroPy/src/omero/gateway/__init__.py:    def __init__ (self, conn=None, obj=None, cache={}, **kwargs):
OmeroPy/src/omero/util/concurrency.py:    def __init__(self, interval, function, args=[], kwargs={}):
OmeroPy/src/omero/util/mpfit.py:	def __init__(self, fcn, xall=None, functkw={}, parinfo=None,
OmeroPy/src/omero_sys_ParametersI.py:    def __init__(self, parammap = {}):
~/git/components/tools $ git grep __init__ | grep '\[\]'
OmeroFS/fsLists.py:    def __init__(self, initialList=[]):
OmeroFS/fsLists.py:    def __init__(self, initialList=[]):
OmeroFS/fsLists.py:    def __init__(self, initialList=[]):
OmeroFS/test/drivers.py:    def __init__(self, dir=None, pre = [], post = []):
OmeroPy/src/omero/gateway/__init__.py:    def __init__ (self, username=None, passwd=None, client_obj=None, group=None, clone=False, try_super=False, host=None, port=None, extra_config=[], secure=False, anonymous=True, useragent=None):
OmeroPy/src/omero/install/logs_library.py:    def __init__(self, files, entries, exits, storeonce = [], storeall = []):

comment:14 Changed 13 years ago by jmoore

Moved to using pylint rather than grep:

~/git/dist/lib/python $ pylint-2.6 -i yes omero | grep W0102
No config file found, using default configuration

shows all appear to be fixed.

comment:15 Changed 13 years ago by jmoore <josh@…>

  • Remaining Time changed from 0.1 to 0
  • Resolution set to fixed
  • Status changed from accepted to closed

(In [98f9d4e2cfae8191d4593f2a5e0cf2c4ff72b6de/ome.git] on branch develop) Fixing dangerous default arguments (pylint W0102) Fix #4749

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.66579 sec.)

We're Hiring!