Python script can't can't import BioPython modules in Galaxy 16.01

classic Classic list List threaded Threaded
9 messages Options
| Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Python script can't can't import BioPython modules in Galaxy 16.01

Makis Ladoukakis
Hello everyone,

I've recently upgraded to Galaxy 16.01 and i have some issues with a python wrapper from a tool. When I run it via Galaxy I get the following error:

Traceback (most recent call last):
  File "/home/galaxy_user/galaxy/tools/myTools/know_parser/know_parser.py", line 12, in <module>
    from Bio import SeqIO
ImportError: No module named Bio

However when I click on the "view details" icon to copy the command from the tool and run it on my command line the tool works perfectly. In addition this issue occurs while I already have installed BioPython.

When I type Python and write  "from Bio import SeqIO" I get no error.

Can this be an issue related to the virtual environment that is initialized each time Galaxy starts?

Thank you in advance,
Makis Ladoukakis





___________________________________________________________
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
| Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Python script can't can't import BioPython modules in Galaxy 16.01

Peter Cock
On Thu, Mar 3, 2016 at 12:06 PM, Makis Ladoukakis
<[hidden email]> wrote:

> Hello everyone,
>
> I've recently upgraded to Galaxy 16.01 and i have some issues with a python
> wrapper from a tool. When I run it via Galaxy I get the following error:
>
> Traceback (most recent call last):
>   File "/home/galaxy_user/galaxy/tools/myTools/know_parser/know_parser.py",
> line 12, in <module>
>     from Bio import SeqIO
> ImportError: No module named Bio
>
>
> However when I click on the "view details" icon to copy the command from the
> tool and run it on my command line the tool works perfectly. In addition
> this issue occurs while I already have installed BioPython.
>
> When I type Python and write  "from Bio import SeqIO" I get no error.
>
> Can this be an issue related to the virtual environment that is initialized
> each time Galaxy starts?
>
> Thank you in advance,
> Makis Ladoukakis

Almost certainly, yes, this is due to the new venv setup in Galaxy.

If you had manually installed Biopython, I would suggest you install it
again but inside the venv.

If you installed Biopython via the Tool Shed package, that is more troubling.
Try doing a re-install via the Tool Shed.

Peter
___________________________________________________________
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
| Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Python script can't can't import BioPython modules in Galaxy 16.01

Linda Bakker
In reply to this post by Makis Ladoukakis
I guess this relates directly to my question as well...



On 03/03/2016 01:06 PM, Makis Ladoukakis wrote:
Hello everyone,

I've recently upgraded to Galaxy 16.01 and i have some issues with a python wrapper from a tool. When I run it via Galaxy I get the following error:

Traceback (most recent call last):
  File "/home/galaxy_user/galaxy/tools/myTools/know_parser/know_parser.py", line 12, in <module>
    from Bio import SeqIO
ImportError: No module named Bio

However when I click on the "view details" icon to copy the command from the tool and run it on my command line the tool works perfectly. In addition this issue occurs while I already have installed BioPython.

When I type Python and write  "from Bio import SeqIO" I get no error.

Can this be an issue related to the virtual environment that is initialized each time Galaxy starts?

Thank you in advance,
Makis Ladoukakis





___________________________________________________________
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/


-- 
Linda Bakker
Bioinformatics Research Assistant
Plant Research International, Wageningen UR
Building 107 (Radix), room W1.Fa.054
Droevendaalsesteeg 1, 6708 PB, Wageningen, The Netherlands
tel: +31-317-480756
email: [hidden email]

___________________________________________________________
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
| Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Python script can't can't import BioPython modules in Galaxy 16.01

Makis Ladoukakis
Yeah Linda, this was the case for me. When I started the virtual environment I reinstalled BioPython and everything worked again. I suggest you do the same to any packages you need for your tools.

Makis


To: [hidden email]
From: [hidden email]
Date: Thu, 3 Mar 2016 14:10:44 +0100
Subject: Re: [galaxy-dev] Python script can't can't import BioPython modules in Galaxy 16.01

I guess this relates directly to my question as well...



On 03/03/2016 01:06 PM, Makis Ladoukakis wrote:
Hello everyone,

I've recently upgraded to Galaxy 16.01 and i have some issues with a python wrapper from a tool. When I run it via Galaxy I get the following error:

Traceback (most recent call last):
  File "/home/galaxy_user/galaxy/tools/myTools/know_parser/know_parser.py", line 12, in <module>
    from Bio import SeqIO
ImportError: No module named Bio

However when I click on the "view details" icon to copy the command from the tool and run it on my command line the tool works perfectly. In addition this issue occurs while I already have installed BioPython.

When I type Python and write  "from Bio import SeqIO" I get no error.

Can this be an issue related to the virtual environment that is initialized each time Galaxy starts?

Thank you in advance,
Makis Ladoukakis




___________________________________________________________
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/


-- 
Linda Bakker
Bioinformatics Research Assistant
Plant Research International, Wageningen UR
Building 107 (Radix), room W1.Fa.054
Droevendaalsesteeg 1, 6708 PB, Wageningen, The Netherlands
tel: +31-317-480756
email: [hidden email]

___________________________________________________________ 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: https://lists.galaxyproject.org/ To search Galaxy mailing lists use the unified search at: http://galaxyproject.org/search/mailinglists/

___________________________________________________________
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
| Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Can't downgrade database.

Makis Ladoukakis
In reply to this post by Makis Ladoukakis

Hello everyone,


I tried to download a newer version of Galaxy (I had 15.10 and pulled 16.01 in a different directory) and now for some reason in my old working directory I get the error:


Your database has version '133' but this code expects version '129'.


Please backup your database and then migrate the schema by running 'sh manage_db.sh upgrade'.


when I tried:


sh manage_db.sh downgrade --version=129


I got the error:

Traceback (most recent call last):
  File "./scripts/manage_db.py", line 33, in <module>
    invoke_migrate_main()
  File "./scripts/manage_db.py", line 30, in invoke_migrate_main
    main( repository=repo, url=db_url )
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/shell.py", line 209, in main
    ret = command_func(**kwargs)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/api.py", line 202, in downgrade
    return _migrate(url, repository, version, upgrade=False, err=err, **opts)
  File "<string>", line 2, in _migrate
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/util/__init__.py", line 160, in with_engine
    return f(*a, **kw)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/api.py", line 345, in _migrate
    changeset = schema.changeset(version)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/schema.py", line 82, in changeset
    changeset = self.repository.changeset(database, start_ver, version)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/repository.py", line 225, in changeset
    changes = [self.version(v).script(database, op) for v in versions]
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/repository.py", line 189, in version
    return self.versions.version(*p, **k)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/version.py", line 160, in version
    return self.versions[VerNum(vernum)]
KeyError: <VerNum(133)>




I checked earlier posts stating  that i need to remove all .pyc files before downgrading. I did just that but nothing worked.


Any ideas?


Thank you in advance,

Efthymios Ladoukakis





___________________________________________________________
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
| Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't downgrade database.

ROBERT BROWN

Good morning Efthymios Ladoukakis


Yes I had this error and after repeated attempts if found out


sh manage_db.sh  upgrade  because your version is older than the current releaase expects 

You get  a  python  vitural env error but

is fixed by running under sudo


sudo sh manage_db.sh


Try that

cheers,

bob

On January 17, 2017 at 7:33 AM Makis Ladoukakis <[hidden email]> wrote:

Hello everyone,


I tried to download a newer version of Galaxy (I had 15.10 and pulled 16.01 in a different directory) and now for some reason in my old working directory I get the error:


Your database has version '133' but this code expects version '129'.


Please backup your database and then migrate the schema by running 'sh manage_db.sh upgrade'.

 


when I tried:


 

sh manage_db.sh downgrade --version=129

 


I got the error:

 

Traceback (most recent call last):
  File "./scripts/manage_db.py", line 33, in <module>
    invoke_migrate_main()
  File "./scripts/manage_db.py", line 30, in invoke_migrate_main
    main( repository=repo, url=db_url )
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/shell.py", line 209, in main
    ret = command_func(**kwargs)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/api.py", line 202, in downgrade
    return _migrate(url, repository, version, upgrade=False, err=err, **opts)
  File "<string>", line 2, in _migrate
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/util/__init__.py", line 160, in with_engine
    return f(*a, **kw)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/api.py", line 345, in _migrate
    changeset = schema.changeset(version)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/schema.py", line 82, in changeset
    changeset = self.repository.changeset(database, start_ver, version)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/repository.py", line 225, in changeset
    changes = [self.version(v).script(database, op) for v in versions]
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/repository.py", line 189, in version
    return self.versions.version(*p, **k)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/version.py", line 160, in version
    return self.versions[VerNum(vernum)]
KeyError: <VerNum(133)>

 




I checked earlier posts stating  that i need to remove all .pyc files before downgrading. I did just that but nothing worked.


Any ideas?


Thank you in advance,

Efthymios Ladoukakis





 

___________________________________________________________
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:
https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
http://galaxyproject.org/search/mailinglists/

___________________________________________________________
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
| Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't downgrade database.

Martin Čech
In reply to this post by Makis Ladoukakis
Makis,

you need to run the downgrade command (sh manage_db.sh downgrade --version=129) from the folder with the newer Galaxy. The old one does not have the downgrading scripts.

Thanks for using Galaxy.

Martin

On Tue, Jan 17, 2017 at 7:33 AM Makis Ladoukakis <[hidden email]> wrote:

Hello everyone,


I tried to download a newer version of Galaxy (I had 15.10 and pulled 16.01 in a different directory) and now for some reason in my old working directory I get the error:


Your database has version '133' but this code expects version '129'.


Please backup your database and then migrate the schema by running 'sh manage_db.sh upgrade'.


when I tried:


sh manage_db.sh downgrade --version=129


I got the error:

Traceback (most recent call last):
  File "./scripts/manage_db.py", line 33, in <module>
    invoke_migrate_main()
  File "./scripts/manage_db.py", line 30, in invoke_migrate_main
    main( repository=repo, url=db_url )
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/shell.py", line 209, in main
    ret = command_func(**kwargs)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/api.py", line 202, in downgrade
    return _migrate(url, repository, version, upgrade=False, err=err, **opts)
  File "<string>", line 2, in _migrate
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/util/__init__.py", line 160, in with_engine
    return f(*a, **kw)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/api.py", line 345, in _migrate
    changeset = schema.changeset(version)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/schema.py", line 82, in changeset
    changeset = self.repository.changeset(database, start_ver, version)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/repository.py", line 225, in changeset
    changes = [self.version(v).script(database, op) for v in versions]
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/repository.py", line 189, in version
    return self.versions.version(*p, **k)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/version.py", line 160, in version
    return self.versions[VerNum(vernum)]
KeyError: <VerNum(133)>




I checked earlier posts stating  that i need to remove all .pyc files before downgrading. I did just that but nothing worked.


Any ideas?


Thank you in advance,

Efthymios Ladoukakis




___________________________________________________________
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

___________________________________________________________
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
| Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't downgrade database.

Makis Ladoukakis

Thanks a lot for your help! That actually worked.


Kind regards,

Efthymios Ladoukakis




From: Martin Čech <[hidden email]>
Sent: Tuesday, January 17, 2017 4:16 PM
To: Makis Ladoukakis; [hidden email]; [hidden email]
Subject: Re: [galaxy-dev] Can't downgrade database.
 
Makis,

you need to run the downgrade command (sh manage_db.sh downgrade --version=129) from the folder with the newer Galaxy. The old one does not have the downgrading scripts.

Thanks for using Galaxy.

Martin

On Tue, Jan 17, 2017 at 7:33 AM Makis Ladoukakis <[hidden email]> wrote:

Hello everyone,


I tried to download a newer version of Galaxy (I had 15.10 and pulled 16.01 in a different directory) and now for some reason in my old working directory I get the error:


Your database has version '133' but this code expects version '129'.


Please backup your database and then migrate the schema by running 'sh manage_db.sh upgrade'.


when I tried:


sh manage_db.sh downgrade --version=129


I got the error:

Traceback (most recent call last):
  File "./scripts/manage_db.py", line 33, in <module>
    invoke_migrate_main()
  File "./scripts/manage_db.py", line 30, in invoke_migrate_main
    main( repository=repo, url=db_url )
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/shell.py", line 209, in main
    ret = command_func(**kwargs)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/api.py", line 202, in downgrade
    return _migrate(url, repository, version, upgrade=False, err=err, **opts)
  File "<string>", line 2, in _migrate
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/util/__init__.py", line 160, in with_engine
    return f(*a, **kw)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/api.py", line 345, in _migrate
    changeset = schema.changeset(version)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/schema.py", line 82, in changeset
    changeset = self.repository.changeset(database, start_ver, version)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/repository.py", line 225, in changeset
    changes = [self.version(v).script(database, op) for v in versions]
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/repository.py", line 189, in version
    return self.versions.version(*p, **k)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/version.py", line 160, in version
    return self.versions[VerNum(vernum)]
KeyError: <VerNum(133)>




I checked earlier posts stating  that i need to remove all .pyc files before downgrading. I did just that but nothing worked.


Any ideas?


Thank you in advance,

Efthymios Ladoukakis




___________________________________________________________
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

___________________________________________________________
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
| Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Upload tool doesn't work in Galaxy 16.10

Makis Ladoukakis

Hi everyone,


Does anyone else have an issue with the upload tool in the newest Galaxy version? I installed a local instance:


git clone -b release_16.10 https://github.com/galaxyproject/galaxy.git


but when I try to upload any file I get the error:


Failed: Bad Request (400)

Does anyone have any idea why?

I checked the upload tool and both the .xml and python script are the same as in previous versions.

Thank you in advance,
Efthymios Ladoukakis



___________________________________________________________
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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
Loading...