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 and send the paster log from the clean 
upgrade if you see a problem.  Also:
What database are you using?  
Have you installed any tool shed repositories into your local Galaxy instance?

Thanks,

Greg


On Feb 6, 2012, at 1:32 PM, Thon Deboer wrote:

> Hi,
> 
> I updated to the latest galaxy-central version but got this error when trying 
> to upgrade...
> 
> Any ideas? It seems the table had already been created (this was the second 
> time I run upgrade) but the JSON error was one that showed up the first 
> time...)
> 
> Thanks
> 
> Thon
> 
>  sh manage_db.sh upgrade
> 90 -> 91...
> 
> Migration script to create the tool_version and tool_version_association 
> tables and drop the tool_id_guid_map table.
> 
> 0091_add_tool_version_tables DEBUG 2012-02-06 10:23:39,847 Creating 
> tool_version table failed: (ProgrammingError) relation "tool_version" already 
> exists
>  '\nCREATE TABLE tool_version (\n\tid SERIAL NOT NULL, \n\tcreate_time 
> TIMESTAMP WITHOUT TIME ZONE, \n\tupdate_time TIMESTAMP WITHOUT TIME ZONE, 
> \n\ttool_id VARCHAR(255), \n\ttool_shed_repository_id INTEGER, \n\tPRIMARY 
> KEY (id), \n\t FOREIGN KEY(tool_shed_repository_id) REFERENCES 
> tool_shed_repository (id)\n)\n\n' {}
> 0091_add_tool_version_tables DEBUG 2012-02-06 10:23:39,847 Creating 
> tool_version table failed: (ProgrammingError) relation "tool_version" already 
> exists
>  '\nCREATE TABLE tool_version (\n\tid SERIAL NOT NULL, \n\tcreate_time 
> TIMESTAMP WITHOUT TIME ZONE, \n\tupdate_time TIMESTAMP WITHOUT TIME ZONE, 
> \n\ttool_id VARCHAR(255), \n\ttool_shed_repository_id INTEGER, \n\tPRIMARY 
> KEY (id), \n\t FOREIGN KEY(tool_shed_repository_id) REFERENCES 
> tool_shed_repository (id)\n)\n\n' {}
> 0091_add_tool_version_tables DEBUG 2012-02-06 10:23:39,863 Creating 
> tool_version_association table failed: (ProgrammingError) relation 
> "tool_version_association" already exists
>  '\nCREATE TABLE tool_version_association (\n\tid SERIAL NOT NULL, 
> \n\ttool_id INTEGER NOT NULL, \n\tparent_id INTEGER NOT NULL, \n\tPRIMARY KEY 
> (id), \n\t FOREIGN KEY(tool_id) REFERENCES tool_version (id), \n\t FOREIGN 
> KEY(parent_id) REFERENCES tool_version (id)\n)\n\n' {}
> 0091_add_tool_version_tables DEBUG 2012-02-06 10:23:39,863 Creating 
> tool_version_association table failed: (ProgrammingError) relation 
> "tool_version_association" already exists
>  '\nCREATE TABLE tool_version_association (\n\tid SERIAL NOT NULL, 
> \n\ttool_id INTEGER NOT NULL, \n\tparent_id INTEGER NOT NULL, \n\tPRIMARY KEY 
> (id), \n\t FOREIGN KEY(tool_id) REFERENCES tool_version (id), \n\t FOREIGN 
> KEY(parent_id) REFERENCES tool_version (id)\n)\n\n' {}
> 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)
> 
> 
> 
> Regards,
> 
> Thon de Boer, Ph.D.
> Bioinformatics Guru
> +1-650-799-6839
> thondeb...@me.com
> LinkedIn Profile
> 
> 
> 
> 
> ___________________________________________________________
> Please keep all replies on the list by using "reply all"
> in your mail client.  To manage your subscriptions to this
> and other Galaxy lists, please use the interface at:
> 
>  http://lists.bx.psu.edu/

___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/

Reply via email to