Hi Philipp,
please alway reply to the mailing list.

I'm not using Docker, but if Galaxy is in the /galaxy-central/ directory and its version is 16.01, then:

$ cd /galaxy-central/
$ . .venv/bin/activate
$ python scripts/cleanup_datasets/cleanup_datasets.py config/galaxy.ini -d -30 -1
$ deactivate

The command ". .venv/bin/activate" will activate the virtualenv installed in /galaxy-central/.venv/ , "deactivate" will deactivate it.

Cheers,
Nicola

On 23/02/16 19:14, Rathert, Philipp, Dr. wrote:
Hi Nicola,
Could you be a bit more specific?
I guess i activate this in the specific container but how exactly?

Thanks a lot for your help.


Cheers,

Philipp
---Philipp on the road---

Am 23.02.2016 um 16:20 schrieb Nicola Soranzo <nsoranzo@tiscali.it>:

Hi Philipp,
if you are using Galaxy release 16.01, you should load the virtualenv
before running the cleanup script, e.g.:

$ cd GALAXY_HOME
$ . .venv/bin/activate
$ python scripts/cleanup_datasets/cleanup_datasets.py ...

Cheers,
Nicola

On 23/02/16 15:07, Hans-Rudolf Hotz wrote:
> Hi Philipp
>
>
> point 1 : that's as expected - good.
>
> point 2 : looks like a docker specific issue? Maybe Bjoern can jump in?
>
>
> Hans-Rudolf
>
>
>
>
> On 02/23/2016 12:17 PM, Rathert, Philipp, Dr. wrote:
>> Dear Hans-Rudolf,
>>
>> thanks a lot for your help.
>>
>> I did as you suggested:
>>
>> 1. when I go into the scripts folder I get the error message you
>> guessed:
>> root@galaxy:/galaxy-central/scripts# python
>> cleanup_datasets/cleanup_datasets.py
>> /export/galaxy-central/config/galaxy.ini -d -30 -1
>> Traceback (most recent call last):
>>     File "cleanup_datasets/cleanup_datasets.py", line 21, in <module>
>>       import galaxy.config
>> ImportError: No module named galaxy.config
>>
>>
>> 2. from the root directory I recieve the following error message:
>> root@galaxy:/galaxy-central# python
>> scripts/cleanup_datasets/cleanup_datasets.py
>> /export/galaxy-central/config/galaxy.ini -d -60 -1
>> Traceback (most recent call last):
>>     File "scripts/cleanup_datasets/cleanup_datasets.py", line 21, in
>> <module>
>>       import galaxy.config
>>     File "/galaxy-central/lib/galaxy/config.py", line 21, in <module>
>>       from galaxy.util.dbkeys import GenomeBuilds
>>     File "/galaxy-central/lib/galaxy/util/dbkeys.py", line 7, in
>> <module>
>>       from galaxy.util.object_wrapper import sanitize_lists_to_string
>>     File "/galaxy-central/lib/galaxy/util/object_wrapper.py", line
>> 45, in
>> <module>
>>       from six.moves import UserDict
>> ImportError: cannot import name UserDict
>>
>> Any idea what this means? I thought this should be automatically
>> installed with python...
>>
>> Cheers,
>>
>> Philipp
>>
>>      -----Original message-----
>>      *From:* Hans-Rudolf Hotz <hrh@fmi.ch>
>>      *Sent:* Monday 22nd February 2016 17:09
>>      *To:* Rathert, Philipp, Dr. <philipp.rathert@ibc.uni-stuttgart.de>;
>>      galaxy-dev@lists.galaxyproject.org
>>      *Subject:* Re: [galaxy-dev] cleanup
>>
>>      Hi Philipp
>>
>>      > Since the new galaxy version, I am unable to perform a cleanup
>> anymore.
>>      >
>>      >  From the galaxy root directory I want to start the script
>>      > cleanup_datasets.py with the following line:
>>      >
>>      > $ python cleanup_datasets.py
>> /export/galaxy-central/config/galaxy.ini -d
>>      > -60 -1
>>      >
>>      > I get the error message:
>>      >
>>      > Can’t open file ‘cleanup_datasets.py’: no such file or directory.
>>
>>      Have you tried:
>>
>>      $ python scripts/cleanup_datasets/cleanup_datasets.py
>>      /export/galaxy-central/config/galaxy.ini -d -60 -1
>>
>>      > But when I go into the folder in which the script is located
>> it doesn’t
>>      > work as well.
>>
>>      what is the error this time? Is it "ImportError: No module named
>> galaxy"?
>>
>>
>>      Regards, Hans-Rudolf
>>
>>
>>      > For your information: we are running the latest
>> docker-galaxy-stable
>>      > version.
>>      >
>>      > I hope somebody has an idea.
>>      >
>>      > Cheers,
>>      >
>>      > Philipp
>>      >
>>      > ----------------------------------------------
>>      >
>>      > Philipp Rathert, PhD
>>      >
>>      > Institute of Biochemistry
>>      >
>>      > University Stuttgart
>>      >
>>      > Pfaffenwaldring 55
>>      >
>>      > D-70569 Stuttgart
>>      >
>>      > Germany
>>      >
>>      > Tel: +49 711 685 64388
>>      >
>>      > Fax: +49 711 685 64392
>>      >
>>      > philipp.rathert@ibc.uni-stuttgart.de
>>      > <mailto:philipp.rathert@ibc.uni-stuttgart.de>
>>      >
>>      > http://www.ibc.uni-stuttgart.de/
>>      >
>>      > http://www.ibc.uni-stuttgart.de/mitarbeiter/Rathert/?__locale=en
>>      >
>>      >
>>      >
>>      > ___________________________________________________________
>>      > 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/