bunq / tinker_python

Install Tinker by just running this command: bash <(curl -s https://tinker.bunq.com/python/setup.sh)
MIT License
15 stars 7 forks source link

Running go-pro does not create a production config #12

Open Ganonmaster opened 6 years ago

Ganonmaster commented 6 years ago

Environment: Ubuntu 18.04, dependencies up-to-date.

  1. Run setup with bash/curl pipe provided at bunq.com/api
  2. Run ./go-pro
  3. Scan the QR code and confirm in the app
  4. go-pro returns with the title GO PRO title and the message "You're ready to use the PRODUCTION environment." and the help options with the --production flags.
  5. No bunq-production.conf is created, so none of the commands work.
OGKevin commented 6 years ago

@Ganonmaster there should be an error message somewhere. Its highly unlikely that it fails without an error message. Can you check for an error ?

Ganonmaster commented 6 years ago

image No error, no production config.

Python 3.6.5, pip 18, pipenv 11.8.3.

Ganonmaster commented 6 years ago

Note that in the Bunq app, the API key still shows as "unassigned" as well.

OGKevin commented 6 years ago

Interesting, ill have a look and will let you know what my findings are.

OGKevin commented 6 years ago

hmm, i just ran it on macos and it seems to work as expected. 🤔

Can you try to trace the execution of go pro and see if the bash script is actually running like it should.

https://stackoverflow.com/questions/951336/how-to-debug-a-bash-script/

Ganonmaster commented 6 years ago

Found some debug output that might indicate where this is going wrong:

+ tinker/create_production_configuration.py --api-key <REMOVED>
/usr/bin/env: ‘.venv/bin/python -W ignore’: No such file or directory

It is making the assumption that my python binary is literally named python, when it actually is not.

image

OGKevin commented 6 years ago

no, the bash script should create a dir ./.venv and in there there should indeed be a executable named python so it seems that the installation failed.

it seems that

https://github.com/bunq/tinker_python/blob/dfe9812d11a1b50d7aed715529e6ea5bd827ac9c/setup.sh#L146-L149

is not executed correctly then 🤔

Ganonmaster commented 6 years ago

image

Ganonmaster commented 6 years ago

I think I found the problem. I had setup a custom alias for the default python version on ubuntu (because the default is 2.7)

Edit: no luck it seems. It's still not finding the python binary.

OGKevin commented 6 years ago

by the look of the screen shot, are you in a virtual env ? might that be it ?

Ganonmaster commented 6 years ago

The virtualenv I enter is the one that the setup script creates. Is that not how it's supposed to work? Either way, I just tested without entering the virtualenv, and it makes no difference.

OGKevin commented 6 years ago

No, at least not for me on macos 🤔

might it have something to do with https://github.com/bunq/tinker_python/issues/3 ?