Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hca prints --help insted of run #112

Closed
oskotsky opened this issue Apr 26, 2018 · 21 comments
Closed

hca prints --help insted of run #112

oskotsky opened this issue Apr 26, 2018 · 21 comments

Comments

@oskotsky
Copy link

hca dss download --bundle-uuid XXXXXXXXXX --replica aws just prints help output. adding --log-level DEBUG is not recognized as a switch

Thank you

@ttung
Copy link
Member

ttung commented Apr 26, 2018

What do you get when you run hca --version?

@oskotsky
Copy link
Author

$ hca --version
hca 3.4.6 (CPython 3.4.2 Linux-3.10.0-862.el7.x86_64-x86_64-with-redhat-7.5-Maipo)

I am trying to run this on rhel7 remote server, no gui. Would it be a problem? Does hca use port 443 only? I wonder if any additional traffic blocked by our firewall and that is why it breaks.
Thank you

@ttung
Copy link
Member

ttung commented Apr 26, 2018

What's the exact command you're running?

@oskotsky
Copy link
Author

I was given a script "hca-download-census". Inside the script this seems to fail: "hca dss download --bundle-uuid XXXXXXXXXX --replica aws". I tried on my home system - Ubuntu Desktop and it worked without any issues.

@ttung
Copy link
Member

ttung commented Apr 26, 2018

Ohhhh, yeah, I think this might be firewall-related.

What do you get when you run curl https://dss.data.humancellatlas.org/v1/swagger.json | md5?

@oskotsky
Copy link
Author

seems like working
$ curl https://dss.data.humancellatlas.org/v1/swagger.json | md5sum
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 100 55820 100 55820 0 0 144k 0 --:--:-- --:--:-- --:--:-- 144k
b6f06dffb65862d3367ca8e502fb1f06 -

@ttung
Copy link
Member

ttung commented Apr 26, 2018

That looks good. Can you zip up the contents of ~/.config/hca and post that here?

@oskotsky
Copy link
Author

hca_config.zip
here it is

Thank you

@ttung
Copy link
Member

ttung commented Apr 27, 2018

Hm... that looks okay. What do you get when you run hca dss download --help?

@oskotsky
Copy link
Author

i see this:

$ hca dss download --help
usage: hca dss download [-h] --bundle-uuid BUNDLE_UUID --replica REPLICA
[--version VERSION] [--dest-name DEST_NAME]

Download a bundle and save it to the local filesystem as a directory.

optional arguments:
-h, --help show this help message and exit
--bundle-uuid BUNDLE_UUID
--replica REPLICA
--version VERSION
--dest-name DEST_NAME

@ttung
Copy link
Member

ttung commented Apr 27, 2018

So what do you get when you run:

hca dss download --bundle-uuid c94a43f9-257f-4cd0-b2fe-eaf6d5d37d18 --replica aws?

@oskotsky
Copy link
Author

this is what is odd:

$ hca dss download --bundle-uuid c94a43f9-257f-4cd0-b2fe-eaf6d5d37d18 --replica aws
usage: hca dss [-h]
{delete-subscription,post-search,get-file,put-subscription,post-bundles-checkout,get-subscriptions,put-bundle,head-file,get-bundles-checkout,delete-bundle,put-file,get-bundle,get-subscription,login,logout,download,upload}
...

positional arguments:
{delete-subscription,post-search,get-file,put-subscription,post-bundles-checkout,get-subscriptions,put-bundle,head-file,get-bundles-checkout,delete-bundle,put-file,get-bundle,get-subscription,login,logout,download,upload}
delete-subscription
Delete an event subscription.
post-search Find bundles by searching their metadata with an
Elasticsearch query
get-file Retrieve a file given a UUID and optionally a version.
put-subscription Create a event subscription.
post-bundles-checkout
Check out a bundle to DSS-managed or user-managed
cloud object storage destination
get-subscriptions Retrieve a user's event subscriptions.
put-bundle Create a bundle
head-file Retrieve a file's metadata given an UUID and
optionally a version.
get-bundles-checkout
Check the status of a checkout request.
delete-bundle Delete a bundle or a specific bundle version
put-file Create a new version of a file
get-bundle Retrieve a bundle given a UUID and optionally a
version.
get-subscription Retrieve an event subscription given a UUID.
login Configure and save hca dss authentication credentials.
logout Clear hca dss authentication credentials previously
configured with hca dss login.
download Download a bundle and save it to the local filesystem
as a directory.
upload Upload a directory of files from the local filesystem
and create a bundle containing the uploaded files.

optional arguments:
-h, --help show this help message and exit

@ttung
Copy link
Member

ttung commented Apr 27, 2018

Can you update your Python to a newer version?

@oskotsky
Copy link
Author

this is a big system used by many people - it can't be done quickly and easily. :(

@oskotsky
Copy link
Author

we have 2.7 and 3.4

@ttung
Copy link
Member

ttung commented Apr 27, 2018

Which 2.7 version?

@oskotsky
Copy link
Author

Python 2.7.5

works the same way unfortunately:

$ export PATH=/opt/rh/python27/root/usr/bin/:$PATH
$ python --version
Python 2.7.5
$
$ hca dss download --bundle-uuid c94a43f9-257f-4cd0-b2fe-eaf6d5d37d18 --replica aws
usage: hca dss [-h]
{head-file,get-bundle,put-subscription,post-bundles-checkout,get-bundles-checkout,delete-subscription,put-file,get-file,delete-bundle,get-subscription,get-subscriptions,post-search,put-bundle,login,logout,download,upload}
...

positional arguments:
{head-file,get-bundle,put-subscription,post-bundles-checkout,get-bundles-checkout,delete-subscription,put-file,get-file,delete-bundle,get-subscription,get-subscriptions,post-search,put-bundle,login,logout,download,upload}
head-file Retrieve a file's metadata given an UUID and
optionally a version.
get-bundle Retrieve a bundle given a UUID and optionally a
version.
put-subscription Create a event subscription.
post-bundles-checkout
Check out a bundle to DSS-managed or user-managed
cloud object storage destination
get-bundles-checkout
Check the status of a checkout request.
delete-subscription
Delete an event subscription.
put-file Create a new version of a file
get-file Retrieve a file given a UUID and optionally a version.
delete-bundle Delete a bundle or a specific bundle version
get-subscription Retrieve an event subscription given a UUID.
get-subscriptions Retrieve a user's event subscriptions.
post-search Find bundles by searching their metadata with an
Elasticsearch query
put-bundle Create a bundle
login Configure and save hca dss authentication credentials.
logout Clear hca dss authentication credentials previously
configured with hca dss login.
download Download a bundle and save it to the local filesystem
as a directory.
upload Upload a directory of files from the local filesystem
and create a bundle containing the uploaded files.

optional arguments:
-h, --help show this help message and exit
$

@kislyuk
Copy link
Member

kislyuk commented Apr 28, 2018

Hi @oskotsky, I recognize where the bug is coming from and will push out a fix shortly. The issue has been fixed in Python 2.7, but, just putting Python 2.7 into your $PATH is not sufficient to trigger its use - you actually have to use pip2 or a virtualenv to re-install the package.

@oskotsky
Copy link
Author

Thank you! Running in virtualenv solved the problem. It should be encouraged anyway, right?

@oskotsky
Copy link
Author

@kislyuk pointed the solution - running hca in virtualenv. solves the problem. Thank you so much!

@kozbo
Copy link
Collaborator

kozbo commented Jun 8, 2018

Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants