Question: Unable to execute a python file with API
0
gravatar for jchen015
3.8 years ago by
jchen015 • 80
Singapore
jchen015 • 80 wrote:

Hi guys

Ok, so referencing from http://bioblend.readthedocs.org/en/latest/api_docs/galaxy/all.html#module-bioblend.galaxy.histories , I tried out the first example of retrieving all the histories of users.

The link below consist of 2 images:

https://www.dropbox.com/sh/ld0a3uwznud565n/AABuWG-Neeo2VdrwZ9m6bgLca?dl=0

 

Image1.png contains the code (similar from the bioblend link) with my API key.

Image2.png contains the result after i executed the command

Here's what I did, i have a python script workflow.py) and placed it at the desktop. Hence, I cd to desktop and executed "./workflow.py" but the error shows Permission Denied.

 

**I already installed bioblend by executing the command "sudo pip install bioblend" , is there anything else that i missed that had causes this problem?

 

Regards,

Julius

ADD COMMENT • link • modified 3.8 years ago by Dannon Baker ♦ 3.7k • written 3.8 years ago by jchen015 • 80
2
gravatar for Dannon Baker
3.8 years ago by
Dannon Baker ♦ 3.7k
United States
Dannon Baker ♦ 3.7k wrote:

The python file isn't executable.  It needs a shebang and to have the executable bit set to execute like that from the command line (http://stackoverflow.com/questions/6908143/should-i-put-shebang-in-python-scripts-and-what-form-should-it-take)

That said, an easier way to run this would be to do:

python workflow.py

ADD COMMENT • link written 3.8 years ago by Dannon Baker ♦ 3.7k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 165 users visited in the last hour