Re: [galaxy-dev] Command Line Tool for Creating New Users

2013-04-29 Thread Ross
Neil,
AFAIK, python will not load a module unless the relevant script file is
marked as executable by the current user?
Try something like:
chmod ugo+x scripts/db_shell.py
and see if that fixes your problem?



On Tue, Apr 30, 2013 at 11:50 AM, neil.burd...@csiro.au wrote:

 Hi,
 I'm trying to use the tool, however, when I run it I get:


 python create_galaxy_users.py

 Traceback (most recent call last):
   File create_galaxy_users.py, line 2, in module
 from scripts.db_shell import *
 ImportError: No module named scripts.db_shell

 I've set my PYTHONPATH to be ~/galaxy-dist/lib. What else do I need to do?
 I'm running the script from ~/galaxy-dist/ directory, but I get the same
 error if I copy it into the scripts directory. I've checked and I can see
 that the scripts.db_shell.py script exists

 If I comment out the line then the next error I get is:

 python create_galaxy_users.py
 Traceback (most recent call last):
   File create_galaxy_users.py, line 7, in module
 from galaxy.security import GalaxyRBACAgent
   File /home/galaxy/galaxy-dist/lib/galaxy/security/__init__.py, line 9,
 in module
 from galaxy.model.orm import *
   File /home/galaxy/galaxy-dist/lib/galaxy/model/__init__.py, line 15,
 in module
 from galaxy.security import RBACAgent, get_permitted_actions
 ImportError: cannot import name RBACAgent

 Any help much appreciated

 Neil
 --

 Message: 1
 Date: Sat, 27 Apr 2013 14:07:49 -0500
 From: John Chilton chil...@msi.umn.edu
 To: Adam Brenner aebre...@uci.edu
 Cc: galaxy-dev@lists.bx.psu.edu galaxy-dev@lists.bx.psu.edu
 Subject: Re: [galaxy-dev] Command Line Tool for Creating New Users
 Message-ID:
 
 canwbokctvxo-dfmamr77fu6bbdhgr1stg7mph_lp+fe2nmc...@mail.gmail.com
 Content-Type: text/plain; charset=ISO-8859-1

 I put together a script to do this. It is described in the galaxy-dev
 thread titled: [galaxy-dev] user creation using API. It doesn't actually
 use the API, it uses the db_shell.py script.

 Hope this helps.

 -John



___
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:
  http://galaxyproject.org/search/mailinglists/

Re: [galaxy-dev] Command Line Tool for Creating New Users

2013-04-29 Thread Neil.Burdett
Thanks for the info Ross

But I still get the same error

ImportError: No module named scripts.db_shell

After chmod 777 scripts/db_shell.py

When you get ImportError: No module named galaxy  for example it's because 
the PYTHONPATH isn't set so I guess there's some variable I need to set for the 
scripts directory???

Thanks anyway

Neil

From: Ross [mailto:ross.laza...@gmail.com]
Sent: Tuesday, 30 April 2013 12:00 PM
To: Burdett, Neil (ICT Centre, Herston - RBWH)
Cc: galaxy-dev@lists.bx.psu.edu
Subject: Re: [galaxy-dev] Command Line Tool for Creating New Users

Neil,
AFAIK, python will not load a module unless the relevant script file is marked 
as executable by the current user?
Try something like:
chmod ugo+x scripts/db_shell.py
and see if that fixes your problem?


On Tue, Apr 30, 2013 at 11:50 AM, 
neil.burd...@csiro.aumailto:neil.burd...@csiro.au wrote:
Hi,
I'm trying to use the tool, however, when I run it I get:


python create_galaxy_users.py

Traceback (most recent call last):
  File create_galaxy_users.py, line 2, in module
from scripts.db_shell import *
ImportError: No module named scripts.db_shell

I've set my PYTHONPATH to be ~/galaxy-dist/lib. What else do I need to do? I'm 
running the script from ~/galaxy-dist/ directory, but I get the same error if I 
copy it into the scripts directory. I've checked and I can see that the 
scripts.db_shell.pyhttp://scripts.db_shell.py script exists

If I comment out the line then the next error I get is:

python create_galaxy_users.py
Traceback (most recent call last):
  File create_galaxy_users.py, line 7, in module
from galaxy.security import GalaxyRBACAgent
  File /home/galaxy/galaxy-dist/lib/galaxy/security/__init__.py, line 9, in 
module
from galaxy.model.orm import *
  File /home/galaxy/galaxy-dist/lib/galaxy/model/__init__.py, line 15, in 
module
from galaxy.security import RBACAgent, get_permitted_actions
ImportError: cannot import name RBACAgent

Any help much appreciated

Neil
--

Message: 1
Date: Sat, 27 Apr 2013 14:07:49 -0500
From: John Chilton chil...@msi.umn.edumailto:chil...@msi.umn.edu
To: Adam Brenner aebre...@uci.edumailto:aebre...@uci.edu
Cc: galaxy-dev@lists.bx.psu.edumailto:galaxy-dev@lists.bx.psu.edu 
galaxy-dev@lists.bx.psu.edumailto:galaxy-dev@lists.bx.psu.edu
Subject: Re: [galaxy-dev] Command Line Tool for Creating New Users
Message-ID:

canwbokctvxo-dfmamr77fu6bbdhgr1stg7mph_lp+fe2nmc...@mail.gmail.commailto:canwbokctvxo-dfmamr77fu6bbdhgr1stg7mph_lp%2bfe2nmc...@mail.gmail.com
Content-Type: text/plain; charset=ISO-8859-1

I put together a script to do this. It is described in the galaxy-dev thread 
titled: [galaxy-dev] user creation using API. It doesn't actually use the 
API, it uses the db_shell.py script.

Hope this helps.

-John

___
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:
  http://galaxyproject.org/search/mailinglists/

Re: [galaxy-dev] Command Line Tool for Creating New Users

2013-04-29 Thread Ross
Funny, it works for me.
One last thought: You do still have the distributed __init__.py readable by
your userid in  /scripts so the module loader knows it's a python package
directory?


On Tue, Apr 30, 2013 at 12:05 PM, neil.burd...@csiro.au wrote:

  Thanks for the info Ross

 ** **

 But I still get the same error

 ** **

 “ImportError: No module named scripts.db_shell”

 ** **

 After chmod 777 scripts/db_shell.py

 ** **

 When you get “ImportError: No module named galaxy”  for example it’s
 because the PYTHONPATH isn’t set so I guess there’s some variable I need to
 set for the scripts directory???

 ** **

 Thanks anyway

 ** **

 Neil

 ** **

 *From:* Ross [mailto:ross.laza...@gmail.com]
 *Sent:* Tuesday, 30 April 2013 12:00 PM
 *To:* Burdett, Neil (ICT Centre, Herston - RBWH)
 *Cc:* galaxy-dev@lists.bx.psu.edu

 *Subject:* Re: [galaxy-dev] Command Line Tool for Creating New Users

  ** **

 Neil, 

 AFAIK, python will not load a module unless the relevant script file is
 marked as executable by the current user?

 Try something like:

 chmod ugo+x scripts/db_shell.py

 and see if that fixes your problem?

 ** **

 ** **

 On Tue, Apr 30, 2013 at 11:50 AM, neil.burd...@csiro.au wrote:

 Hi,
 I'm trying to use the tool, however, when I run it I get:


 python create_galaxy_users.py

 Traceback (most recent call last):
   File create_galaxy_users.py, line 2, in module
 from scripts.db_shell import *
 ImportError: No module named scripts.db_shell

 I've set my PYTHONPATH to be ~/galaxy-dist/lib. What else do I need to do?
 I'm running the script from ~/galaxy-dist/ directory, but I get the same
 error if I copy it into the scripts directory. I've checked and I can see
 that the scripts.db_shell.py script exists

 If I comment out the line then the next error I get is:

 python create_galaxy_users.py
 Traceback (most recent call last):
   File create_galaxy_users.py, line 7, in module
 from galaxy.security import GalaxyRBACAgent
   File /home/galaxy/galaxy-dist/lib/galaxy/security/__init__.py, line 9,
 in module
 from galaxy.model.orm import *
   File /home/galaxy/galaxy-dist/lib/galaxy/model/__init__.py, line 15,
 in module
 from galaxy.security import RBACAgent, get_permitted_actions
 ImportError: cannot import name RBACAgent

 Any help much appreciated

 Neil
 --

 Message: 1
 Date: Sat, 27 Apr 2013 14:07:49 -0500
 From: John Chilton chil...@msi.umn.edu
 To: Adam Brenner aebre...@uci.edu
 Cc: galaxy-dev@lists.bx.psu.edu galaxy-dev@lists.bx.psu.edu
 Subject: Re: [galaxy-dev] Command Line Tool for Creating New Users
 Message-ID:
 
 canwbokctvxo-dfmamr77fu6bbdhgr1stg7mph_lp+fe2nmc...@mail.gmail.com
 Content-Type: text/plain; charset=ISO-8859-1

 I put together a script to do this. It is described in the galaxy-dev
 thread titled: [galaxy-dev] user creation using API. It doesn't actually
 use the API, it uses the db_shell.py script.

 Hope this helps.

 -John

 




-- 
Ross Lazarus MBBS MPH;
Head, Medical Bioinformatics, BakerIDI; Tel: +61 385321444
http://scholar.google.com/citations?hl=enuser=UCUuEM4J
___
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:
  http://galaxyproject.org/search/mailinglists/

Re: [galaxy-dev] Command Line Tool for Creating New Users

2013-04-29 Thread Neil.Burdett
Thanks Ross. I was missing __init__.py

It now works thanks

Neil

From: Ross [mailto:ross.laza...@gmail.com]
Sent: Tuesday, 30 April 2013 12:14 PM
To: Burdett, Neil (ICT Centre, Herston - RBWH)
Cc: galaxy-dev@lists.bx.psu.edu
Subject: Re: [galaxy-dev] Command Line Tool for Creating New Users

Funny, it works for me.
One last thought: You do still have the distributed __init__.py readable by 
your userid in  /scripts so the module loader knows it's a python package 
directory?

On Tue, Apr 30, 2013 at 12:05 PM, 
neil.burd...@csiro.aumailto:neil.burd...@csiro.au wrote:
Thanks for the info Ross

But I still get the same error

ImportError: No module named scripts.db_shell

After chmod 777 scripts/db_shell.py

When you get ImportError: No module named galaxy  for example it's because 
the PYTHONPATH isn't set so I guess there's some variable I need to set for the 
scripts directory???

Thanks anyway

Neil

From: Ross [mailto:ross.laza...@gmail.commailto:ross.laza...@gmail.com]
Sent: Tuesday, 30 April 2013 12:00 PM
To: Burdett, Neil (ICT Centre, Herston - RBWH)
Cc: galaxy-dev@lists.bx.psu.edumailto:galaxy-dev@lists.bx.psu.edu

Subject: Re: [galaxy-dev] Command Line Tool for Creating New Users

Neil,
AFAIK, python will not load a module unless the relevant script file is marked 
as executable by the current user?
Try something like:
chmod ugo+x scripts/db_shell.py
and see if that fixes your problem?


On Tue, Apr 30, 2013 at 11:50 AM, 
neil.burd...@csiro.aumailto:neil.burd...@csiro.au wrote:
Hi,
I'm trying to use the tool, however, when I run it I get:


python create_galaxy_users.py

Traceback (most recent call last):
  File create_galaxy_users.py, line 2, in module
from scripts.db_shell import *
ImportError: No module named scripts.db_shell

I've set my PYTHONPATH to be ~/galaxy-dist/lib. What else do I need to do? I'm 
running the script from ~/galaxy-dist/ directory, but I get the same error if I 
copy it into the scripts directory. I've checked and I can see that the 
scripts.db_shell.pyhttp://scripts.db_shell.py script exists

If I comment out the line then the next error I get is:

python create_galaxy_users.py
Traceback (most recent call last):
  File create_galaxy_users.py, line 7, in module
from galaxy.security import GalaxyRBACAgent
  File /home/galaxy/galaxy-dist/lib/galaxy/security/__init__.py, line 9, in 
module
from galaxy.model.orm import *
  File /home/galaxy/galaxy-dist/lib/galaxy/model/__init__.py, line 15, in 
module
from galaxy.security import RBACAgent, get_permitted_actions
ImportError: cannot import name RBACAgent

Any help much appreciated

Neil
--

Message: 1
Date: Sat, 27 Apr 2013 14:07:49 -0500
From: John Chilton chil...@msi.umn.edumailto:chil...@msi.umn.edu
To: Adam Brenner aebre...@uci.edumailto:aebre...@uci.edu
Cc: galaxy-dev@lists.bx.psu.edumailto:galaxy-dev@lists.bx.psu.edu 
galaxy-dev@lists.bx.psu.edumailto:galaxy-dev@lists.bx.psu.edu
Subject: Re: [galaxy-dev] Command Line Tool for Creating New Users
Message-ID:

canwbokctvxo-dfmamr77fu6bbdhgr1stg7mph_lp+fe2nmc...@mail.gmail.commailto:canwbokctvxo-dfmamr77fu6bbdhgr1stg7mph_lp%2bfe2nmc...@mail.gmail.com
Content-Type: text/plain; charset=ISO-8859-1

I put together a script to do this. It is described in the galaxy-dev thread 
titled: [galaxy-dev] user creation using API. It doesn't actually use the 
API, it uses the db_shell.py script.

Hope this helps.

-John



--
Ross Lazarus MBBS MPH;
Head, Medical Bioinformatics, BakerIDI; Tel: +61 385321444
http://scholar.google.com/citations?hl=enuser=UCUuEM4J
___
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:
  http://galaxyproject.org/search/mailinglists/

Re: [galaxy-dev] Command Line Tool for Creating New Users

2013-04-27 Thread John Chilton
I put together a script to do this. It is described in the galaxy-dev
thread titled: [galaxy-dev] user creation using API. It doesn't
actually use the API, it uses the db_shell.py script.

Hope this helps.

-John



On Thu, Apr 25, 2013 at 7:11 PM, Adam Brenner aebre...@uci.edu wrote:
 Howdy All,

 I was wondering if anyone has created a command line tool that will
 add users to the Galaxy user database?

 I did look into switching to external user authentication via nginx,
 however, this will result in us using the campus wide kerberos system
 and allowing ~30,000 people access to Galaxy... and thus offering us
 less fine grain control to Galaxy.

 Anything anyone has to share would be much appreciated,
 -Adam

 --
 Adam Brenner
 Computer Science, Undergraduate Student
 Donald Bren School of Information and Computer Sciences

 Research Computing Support
 Office of Information Technology
 http://www.oit.uci.edu/rcs/

 University of California, Irvine
 www.ics.uci.edu/~aebrenne/
 aebre...@uci.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/

 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:
  http://lists.bx.psu.edu/

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