Hi Dannon, I am also using postgres 9.1.9 (from Ubuntu precise repository)
$/usr/lib/postgresql/9.1/bin/postgres --version
- postgres (PostgreSQL) 9.1.9
hg summary
- parent: 10411:c42567f43aa7 tip
./scripts/cleanup_datasets/pgcleanup.py -d -o1 -s 'delete_datasets'
__load_config INFO 2013-09-26 10:02:10,368 Reading config from
/opt/galaxy_testing/universe_wsgi.ini
__connect_db INFO 2013-09-26 10:02:10,371 Connecting to database with URL:
#@
Traceback (most recent call last):
File ./scripts/cleanup_datasets/pgcleanup.py, line 774, in module
cleanup = Cleanup()
File ./scripts/cleanup_datasets/pgcleanup.py, line 55, in __init__
self.__connect_db()
File ./scripts/cleanup_datasets/pgcleanup.py, line 115, in __connect_db
self.conn = psycopg2.connect(**args)
TypeError: 'username' is an invalid keyword argument for this function
and if I add
*args['user'] = args['username']
**del args['username']* @ line 112 in pgcleanup.py
the script seems to work.
./scripts/cleanup_datasets/pgcleanup.py -d -o1 -s 'delete_datasets'
delete_datasets INFO 2013-09-26 10:04:10,430 Marking deleted all Datasets
whose associations are all marked as deleted/purged that are older than the
specified number of days.
_create_event DEBUG 2013-09-26 10:04:10,457 SQL is:
INSERT INTO cleanup_event
(create_time, message)
VALUES (NOW(), 'delete_datasets')
RETURNING id;
_create_event INFO 2013-09-26 10:04:10,457 Executing SQL
_create_event INFO 2013-09-26 10:04:10,458 Database status: INSERT 0 1
_update DEBUG 2013-09-26 10:04:10,458 SQL is:
WITH deleted_dataset_ids
AS ( UPDATE dataset
SET deleted = true,
update_time = NOW()
WHERE NOT deleted
AND NOT EXISTS (SELECT true
FROM
library_dataset_dataset_association
WHERE (NOT deleted
OR update_time
= (NOW() - interval '1 days'))
AND dataset.id =
dataset_id)
AND NOT EXISTS (SELECT true
FROM
history_dataset_association
WHERE (NOT purged
OR update_time
= (NOW() - interval '1 days'))
AND dataset.id =
dataset_id)
RETURNING id),
dataset_events
AS (INSERT INTO cleanup_event_dataset_association
(create_time, cleanup_event_id,
dataset_id)
SELECT NOW(), 2, id
FROM deleted_dataset_ids)
SELECT id
FROM deleted_dataset_ids
ORDER BY id;
_update INFO 2013-09-26 10:04:10,458 Executing SQL
_update INFO 2013-09-26 10:04:10,461 Database status: SELECT 0
_flush INFO 2013-09-26 10:04:10,475 All changes committed
_open_logfile DEBUG 2013-09-26 10:04:10,475 Opening log file:
/opt/galaxy_testing/scripts/cleanup_datasets/delete_datasets.log
_close_logfile DEBUG 2013-09-26 10:04:10,476 Closing log file:
/opt/galaxy_testing/scripts/cleanup_datasets/delete_datasets.log
_run INFO 2013-09-26 10:04:10,476 Finished delete_datasets
On 25 September 2013 17:45, Dannon Baker dannon.ba...@gmail.com wrote:
Eric,
What version of posgresql are you using? The script has a comment that
indicates you need 9.1+ (and I'm using 9.1.9), and it works out of the box
for me.
-Dannon
On Fri, Sep 20, 2013 at 7:35 AM, Eric Kuyt eric.ku...@wur.nlmailto:
eric.ku...@wur.nl wrote:
Hi All,
I'm trying to do some cleanup in my test environment (galaxy-dist)
and pgcleanup.py ends with
Traceback (most recent call last):
File ./scripts/cleanup_datasets/pgcleanup.py, line 773, in module
cleanup = Cleanup()
File ./scripts/cleanup_datasets/pgcleanup.py, line 55, in __init__
self.__connect_db()
File ./scripts/cleanup_datasets/pgcleanup.py, line 114, in __connect_db
self.conn = psycopg2.connect(**args)
TypeError: 'username' is an invalid keyword argument for this function
Unless I add
args['user'] = args['username']
del args['username']
Is this a bug or a config error?
Eric
___
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/
To search Galaxy mailing lists use the unified search at: