Thanks for fixing it so fast! Regards, Thon Thon de Boer, Ph.D Bioinformatics Guru T: +1.650.799.6839 | E-mail: thondeboer@me.com http://www.linkedin.com/pub/thon-de-boer/1/1ba/a5b "IMPORTANT NOTICE: This email message is legally privileged, confidential and is for the use of the individual or entity to whom it is addressed. If you have received this email message by error, please immediately notify us by email and delete the message. Thank you." On Feb 7, 2012, at 8:11 AM, Greg Von Kuster <greg@bx.psu.edu> wrote:
Hi Thon,
The fix for this issue in now available in the central repo in change set revision 271ccd09bc23. Even though you have a working version of Galaxy, you should update your instance to at least this revision, and then do the following as soon as possible.
%sh manage_db.sh downgrade 90 91 -> 90... done
%sh manage_db.sh upgrade 90 -> 91...
The problem was caused because you are running postgres version 9 and the original version of my migration script did not handle hex bytea for that version of postgres.
Thanks for finding this problem!
Greg
On Feb 6, 2012, at 10:08 PM, Anthonius deBoer wrote:
Oh, and whatever you did in the little patch, it worked...At least I have a working version of galaxy again and the database seems to be all intact..
Thanks!
Thon
On Feb 06, 2012, at 03:52 PM, Greg Von Kuster <greg@bx.psu.edu> wrote:
Can you replace lines 75 - 86 of the file ~/lib/galaxy/model/migrate/versions/0091_add_tool_version_tables.py with the following for loop and send me your paster log?
Thanks!
for row in result: tool_shed_repository_id = row[0] try: repository_metadata = from_json_string( str( row[1] ) ) # Create a new row in the tool table for each tool included in repository. We will NOT # handle tool_version_associaions because we do not have the information we need to do so. tools = repository_metadata.get( 'tools', [] ) for tool_dict in tools: cmd = "INSERT INTO tool_version VALUES (%s, %s, %s, '%s', %s)" % \ ( nextval( 'tool_version' ), localtimestamp(), localtimestamp(), tool_dict[ 'guid' ], tool_shed_repository_id ) db_session.execute( cmd ) count += 1 except Exception, e: print "Repository metadata: ", str( row[1] ) print "Exception setting tool versions for tools in tool_shed_repository with id: ", str( tool_shed_repository_id ) print str( e )
The lines of code you are replacing look like this:
for row in result: if row[1]: tool_shed_repository_id = row[0] repository_metadata = from_json_string( str( row[1] ) ) # Create a new row in the tool table for each tool included in repository. We will NOT # handle tool_version_associaions because we do not have the information we need to do so. tools = repository_metadata.get( 'tools', [] ) for tool_dict in tools: cmd = "INSERT INTO tool_version VALUES (%s, %s, %s, '%s', %s)" % \ ( nextval( 'tool_version' ), localtimestamp(), localtimestamp(), tool_dict[ 'guid' ], tool_shed_repository_id ) db_session.execute( cmd ) count += 1
On Feb 6, 2012, at 5:23 PM, Anthonius deBoer wrote:
I manually dropped the tool_version and tool_association table in the database and I am left with the JSON error as shown below:
90 -> 91...
Migration script to create the tool_version and tool_version_association tables and drop the tool_id_guid_map table.
Traceback (most recent call last): File "./scripts/manage_db.py", line 63, in <module> main( repository=repo, url=db_url ) File "/home/tdeboer/code/galaxy-central/eggs/sqlalchemy_migrate-0.5.4-py2.6.egg/migrate/versioning/shell.py", line 150, in main ret = command_func(**kwargs) File "/home/tdeboer/code/galaxy-central/eggs/sqlalchemy_migrate-0.5.4-py2.6.egg/migrate/versioning/api.py", line 221, in upgrade return _migrate(url, repository, version, upgrade=True, err=err, **opts) File "/home/tdeboer/code/galaxy-central/eggs/sqlalchemy_migrate-0.5.4-py2.6.egg/migrate/versioning/api.py", line 349, in _migrate schema.runchange(ver, change, changeset.step) File "/home/tdeboer/code/galaxy-central/eggs/sqlalchemy_migrate-0.5.4-py2.6.egg/migrate/versioning/schema.py", line 184, in runchange change.run(self.engine, step) File "/home/tdeboer/code/galaxy-central/eggs/sqlalchemy_migrate-0.5.4-py2.6.egg/migrate/versioning/script/py.py", line 101, in run func() File "lib/galaxy/model/migrate/versions/0091_add_tool_version_tables.py", line 78, in upgrade repository_metadata = from_json_string( str( row[1] ) ) File "/home/tdeboer/code/galaxy-central/eggs/simplejson-2.1.1-py2.6-linux-x86_64-ucs2.egg/simplejson/__init__.py", line 384, in loads File "/home/tdeboer/code/galaxy-central/eggs/simplejson-2.1.1-py2.6-linux-x86_64-ucs2.egg/simplejson/decoder.py", line 402, in decode File "/home/tdeboer/code/galaxy-central/eggs/simplejson-2.1.1-py2.6-linux-x86_64-ucs2.egg/simplejson/decoder.py", line 420, in raw_decode simplejson.decoder.JSONDecodeError: No JSON object could be decoded: line 1 column 0 (char 0)
On Feb 06, 2012, at 02:08 PM, Anthonius deBoer <thondeboer@me.com> wrote:
Hi Greg,
I tried the downgrade/upgrade path and got the exact same message I sent before. I am using a postgres database that is running on local host. I did indeed install some toolshed repositories before I tried to upgrade. I also tried to downgrade to 89 and then upgrade, with the exact same message.
Thon
On Feb 06, 2012, at 10:51 AM, Greg Von Kuster <greg@bx.psu.edu> wrote:
Hello Thon,
Attempting to run the migration script twice to the same version always poses problems. Can you downgrade successfully as follows?
sh manage_db.sh downgrade 90
If so, downgrade, then upgrade again a