Project

General

Profile

Problem uploading images to a new session

Added by Gregory Alushin over 10 years ago

Hello-

I have a newly installed appion 3.0 setup, where I plan on primarily uploading micrographs to the database.

When I try to upload micrographs, I get the following error:

@imageloader.py --projectid=1 --session=14may12z --cs=2.2 --dir=/media/UserData/micros --filetype=mrc --apix=1.09 --binx=1 --biny=1 --df=-2 --mag=100000 --kv=120 --description="micros" --jobtype=uploadimage

... Time stamp: 14may12k46
... Function name: imageloader
... Appion directory: /usr/lib/python2.6/site-packages
... Using split database
Connected to database: 'ap1'
... Committing data to database
Creating a new session
Traceback (most recent call last):
File "/usr/local/myami/appion/bin/imageloader.py", line 581, in <module>
imgLoop = ImageLoader()
File "/usr/local/myami/appion/bin/imageloader.py", line 30, in init
appionLoop2.AppionLoop.__init__(self)
File "/usr/lib/python2.6/site-packages/appionlib/appionLoop2.py", line 31, in init
appionScript.AppionScript.__init__(self)
File "/usr/lib/python2.6/site-packages/appionlib/appionScript.py", line 84, in init
self.checkConflicts()
File "/usr/local/myami/appion/bin/imageloader.py", line 163, in checkConflicts
sessiondata = self.createSession(userdata, self.params['sessionname'], self.params['description'], directory)
File "/usr/local/myami/appion/bin/imageloader.py", line 358, in createSession
sessiondata = self.publish(sessionq)
File "/usr/local/myami/appion/bin/imageloader.py", line 344, in publish
data.insert(force=dbforce)
File "/usr/lib/python2.6/site-packages/sinedon/data.py", line 390, in insert
db.insert(self, **kwargs)
File "/usr/lib/python2.6/site-packages/sinedon/dbdatakeeper.py", line 253, in insert
self._insert(newdata, force=force)
File "/usr/lib/python2.6/site-packages/sinedon/dbdatakeeper.py", line 291, in insert
raise InsertError(e.args[-1])
sinedon.dbdatakeeper.InsertError: Column 'hidden' cannot be null
Exception AttributeError: "'NoneType' object has no attribute 'startswith'" in <bound method ImageLoader.
_del__ of <__main__.ImageLoader object at 0x24a3510>> ignored
@

It looks like the hidden attribute is not being set, is this a correct assessment?

Thanks,
-Greg


Replies (5)

RE: Problem uploading images to a new session - Added by Amber Herold over 10 years ago

Hi Greg,
You have discovered a bit of a bug fix that was made in the trunk and was missed while merging to the 3.0 branch. Very sorry about that. Merging is always tricky business.
I've merged the missing changes with r18262 for issue #2642.
However, I don't believe just updating your code will help you because the changed file is used for setting up the database, which in your case has already happened.
You will need to modify your database to allow null values on the "hidden" column of SessionData table in the Leginon database.

The python script myami/dbschema/schema-r18034.py will do just that. However, your version and revision numbers are probably too high and it would not run.
If you are handy with MySQL, you can make the changes by hand, or use phpMyAdmin to browse to the SessionData table and edit the structure. You would edit the "hidden" attribute and change the "null" column to be set to "null" instead of "not null".

Let me know if you need further help with modifying the table.

RE: Problem uploading images to a new session - Added by Gregory Alushin over 10 years ago

Hi Amber-

Thanks for the reply. I edited the offending table with phpMyAdmin and the upload worked just fine.

Cheers,
-Greg

RE: Problem uploading images to a new session - Added by ShinBo Chen over 10 years ago

How can I find the SessionData table......too many column? Just only on hidden attribute?
Sorry, in my session;I only find the Ap3dDensityData includes sessiondata and hidden attribute.But it's already None!
Any useful setting to debug? Or install the newest version.
Thanks so much.

RE: Problem uploading images to a new session - Added by Anchi Cheng over 10 years ago

Look for the database leginondb first.

In there, there should be SessionData table.

With the tab on Structure to show the structure, you can select hidden column and click "change"

You will then look for "null". It stands for allowing null as a value. Select it to allow it. And then click on "Save"

RE: Problem uploading images to a new session - Added by ShinBo Chen over 10 years ago

Yes...
It works!
That's the key point.
Thanks a lot for Anchi Cheng
~SB

    (1-5/5)