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

Heroku deploy failure due to incorrect setup.py imports #7

Closed
magandrez opened this issue Feb 3, 2016 · 4 comments
Closed

Heroku deploy failure due to incorrect setup.py imports #7

magandrez opened this issue Feb 3, 2016 · 4 comments

Comments

@magandrez
Copy link

Hi,

I forked pybankid-example-app for a project where I need to create a gateway to BankId services, thus, using this wrapper (pybankid). I cloned the project and started by creating a virtual environment with python 2.7 on Mac OS (later I learned that 2.7.8 had some issues with SSL libraries, so I upgraded to 2.7.11, what contains a backport of all the SSL modules since 2.7.9).

When I download the requirements I found a funny thing, and is that first downloads six, requests and so on, and then fails when installing bankid. I found out that by installing each of those separately (i.e.: pip install six pip install requests and so on) it worked like a charm.

That type of issue is described here: pypa/pip#25

That is cool, to work in localhost I instalL each of the requirement lines by splitting the requirements.txt like this: while read in; do pip install "$in"; done < requirements.txt;

However, my problem comes when I need to deploy this to Heroku (silly me, I should have figured out before). The pybankid-example-app, nor any project that has this wrapper as dependency can be built to run in Heroku.

Good news is that this is, apparently a common problem doing imports in the setup.py It is explained here:

scipy/scipy#453

And here an actuall implementation of a similar fix for pandas library: pandas-dev/pandas@28e2a38

My main problem is: I am not sure if I can pull through a similar fix in a reasonable amount of time. Could you help me with it?

Cheers,

-Manuel

hbldh added a commit that referenced this issue Feb 3, 2016
@hbldh hbldh closed this as completed in 37c3f09 Feb 3, 2016
@hbldh
Copy link
Owner

hbldh commented Feb 3, 2016

@magandrez: Ok, so I made a quick and dirty fix for installing pybankid, and it seems to work fine. I deployed version 0.3.1 of PyBankID to PyPI some minutes ago and tested installation on Heroku via the pybankid-example-app and nearly everything works well.

I get a requests.exceptions.SSLError: [SSL: SSLV3_ALERT_CERTIFICATE_UNKNOWN] sslv3 alert certificate unknown (_ssl.c:590) error when I try to run the app, but I think this has to do with an old test certificate stored in the pybankid-example-app repo. I will look into this eventually...
The tests for PyBankID downloads the test certificate from BankID webpage every time the tests runs, so I know the PyBankID works.

Thank you for catching this; it was a clumsy mistake that I will correct in a more proper way later.

@magandrez
Copy link
Author

@hbldh 👍

I had an attempt at this as well. The server seems to run normally, however I get an error on one of the example projects you have with this wrapper when importing bankid :/

https://github.com/magandrez/pybankid/commit/c6fc0466d6d1de6c53aadf8977e76ac6addde9a3

@hbldh
Copy link
Owner

hbldh commented Feb 3, 2016

Included new cert and key in example app rep, pushed it and now it seems to work fine again. Haven't tested thoroughly though.

On 3 feb. 2016, at 15:14, Manuel G. notifications@github.com wrote:

@hbldh

I had an attempt at this as well. The server seems to run normally, however I get an error on one of the example projects you have with this wrapper when importing bankid :/

magandrez@c6fc046


Reply to this email directly or view it on GitHub.

@magandrez
Copy link
Author

@hbldh Hmmm, seems my humble take on Python was not good enough, test won't pass.

However, your version seems to be working wonderfully and I have a running Heroku instance with your wrapper running. Many thanks! :)

-Manuel

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

2 participants