Project

General

Profile

Actions

Bug #641

closed

imageloader.py fails to upload images - a sinedon.cfg problem?

Added by Ed Brignole over 14 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
06/07/2010
Due date:
% Done:

0%

Estimated time:
Affected Version:
Show in known bugs:
Workaround:

Description

It looks like imageloader.py can't get projectdata and crashes (projectdata key error). I guessed it might be looking for sinedon.cfg and tried copying back my old sinedon.cfg or using a modified version of Anchi's. This gets a little farther but still crashes (session name not defined).

***** Here's what happens in the absence of a sinedon.cfg: *****

$imageloader.py --projectid=118 --session=10may28ab --batchparams=/ami/data00/leginon/10may28ab/upload.txt --scopeid=105 --cameraid=104 --description="10may28a and 10may28b with correct tiltangles" --tiltgroup=2 --commit

 ... Time stamp: 10jun07z10
 ... Function name: imageloader
 ... Appion directory: /home/brignole/ami_html/myami/appion
!!! WARNING: Using split database
Traceback (most recent call last):
  File "/home/brignole/ami_html/myami/appion/bin/imageloader.py", line 560, in ?
    imgLoop = ImageLoader()
  File "/home/brignole/ami_html/myami/appion/bin/imageloader.py", line 30, in __init__
    appionLoop2.AppionLoop.__init__(self)
  File "/home/brignole/ami_html/myami/appion/appionlib/appionLoop2.py", line 30, in __init__
    appionScript.AppionScript.__init__(self, True)
  File "/home/brignole/ami_html/myami/appion/appionlib/appionScript.py", line 70, in __init__
    newdbname = apProject.getAppionDBFromProjectId(self.params['projectid'])
  File "/home/brignole/ami_html/myami/appion/appionlib/apProject.py", line 81, in getAppionDBFromProjectId
    projdata = leginon.projectdata.projects.direct_query(projectid)
  File "/home/brignole/ami_html/myami/sinedon/data.py", line 402, in direct_query
    db = connections.getConnection(modulename)
  File "/home/brignole/ami_html/myami/sinedon/connections.py", line 21, in getConnection
    dbconf = dbconfig.getConfig(modulename)
  File "/home/brignole/ami_html/myami/sinedon/dbconfig.py", line 60, in getConfig
    return dict(configs[modulename])
KeyError: 'projectdata'
Exception exceptions.AttributeError: "'NoneType' object has no attribute 'startswith'" in <bound method ImageLoader.__del__ of <__main__.ImageLoader object at 0x2aaaae204d50>> ignored

***** and here's what happens with a sinedon.cfg in my home directory *****

$imageloader.py --projectid=118 --session=10may28ab --batchparams=/ami/data00/leginon/10may28ab/upload.txt --scopeid=105 --cameraid=104 --description="10may28a and 10may28b with correct tiltangles" --tiltgroup=2 --commit

 ... Time stamp: 10jun07z05
 ... Function name: imageloader
 ... Appion directory: /home/brignole/ami_html/myami/appion
!!! WARNING: Using split database
Connected to database: 'ap118'
 ... Committing data to database
Add images to an existing session
Traceback (most recent call last):
  File "/home/brignole/ami_html/myami/appion/bin/imageloader.py", line 560, in ?
    imgLoop = ImageLoader()
  File "/home/brignole/ami_html/myami/appion/bin/imageloader.py", line 30, in __init__
    appionLoop2.AppionLoop.__init__(self)
  File "/home/brignole/ami_html/myami/appion/appionlib/appionLoop2.py", line 30, in __init__
    appionScript.AppionScript.__init__(self, True)
  File "/home/brignole/ami_html/myami/appion/appionlib/appionScript.py", line 80, in __init__
    self.checkConflicts()
  File "/home/brignole/ami_html/myami/appion/bin/imageloader.py", line 134, in checkConflicts
    oldprojectid = apProject.getProjectIdFromSessionName(self.params['sessionname'])
  File "/home/brignole/ami_html/myami/appion/appionlib/apProject.py", line 41, in getProjectIdFromSessionName
    projectid = getProjectIdFromSessionData(sessiondata)
  File "/home/brignole/ami_html/myami/appion/appionlib/apProject.py", line 21, in getProjectIdFromSessionData
    apDisplay.printError("could not find project for session "+sessionname)
NameError: global name 'sessionname' is not defined
Exception exceptions.AttributeError: "'NoneType' object has no attribute 'startswith'" in <bound method ImageLoader.__del__ of <__main__.ImageLoader object at 0x2aaaae204d50>> ignored

Actions #1

Updated by Neil Voss over 14 years ago

  • Status changed from New to Assigned
  • Assignee changed from Anchi Cheng to Ed Brignole

I noticed you are using your own version of myami, have you subversion updated lately.

Actions #2

Updated by Neil Voss over 14 years ago

  • Status changed from Assigned to In Test

I figured it out. I checked your myami is up to date.

When you ran the first issue it created the session, but died before linking the project. When you ran the second one it found the newly created session as existing and tried to find its project id and then crash because it was not found.

Change the name of the session (e.g. 10may28ac) and it should work. If you have your own myami that you are using YOU MUST have a sinedon.cfg.

I fixed it so you can still use 10may28ab if you want.

Actions #3

Updated by Ed Brignole over 14 years ago

  • Status changed from In Test to Closed

That fixed it. I just needed my sinedon.cfg to look exactly like Anchi's.

Actions

Also available in: Atom PDF