-
Notifications
You must be signed in to change notification settings - Fork 5
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
install trouble - error with pip #156
Comments
Andy, I have the exact same problem. I never try to use pip on the DOI network (I just do it at home). But I'm looking into it and hopefully I'll have some better instructions later |
Thanks, Dan.
I emailed Sean Gordon, and we're working through some potential cert fixes now. I'll know more tomorrow a.m. and will share anything if successful.
Andy
…--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Andy O'Neill (she/her)
U.S. Geological Survey - Pacific Coastal and Marine Science Center
https://www.usgs.gov/centers/pcmsc
2885 Mission Street ***@***.******@***.***>
Santa Cruz, CA 95060 (831) 460 - 7586
My time zone and working hours may not be your working hours. Please do not feel obligated to reply outside of your normal work schedule.
________________________________
From: Daniel Buscombe ***@***.***>
Sent: Wednesday, June 14, 2023 4:07 PM
To: Doodleverse/CoastSeg ***@***.***>
Cc: O'Neill, Andrea ***@***.***>; Author ***@***.***>
Subject: [EXTERNAL] Re: [Doodleverse/CoastSeg] install trouble - error with pip (Issue #156)
This email has been received from outside of DOI - Use caution before clicking on links, opening attachments, or responding.
Andy, I have the exact same problem. I never try to use pip on the DOI network (I just do it at home). But I'm looking into it and hopefully I'll have some better instructions later
—
Reply to this email directly, view it on GitHub<#156 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALSSUQTCJJTEGD2GCNFCNTDXLI747ANCNFSM6AAAAAAZHAHUJM>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I did this first to see where my pip.ini file was
None of those files existed, so I made a file
I could then run |
Further details. I made sure that my c:\Users\me\pip.ini
c:\Users\me\AppData\Local\miniconda3\.condarc
c:\Users\me\.condarc
c:\Users\me\.gitconfig
But I still get ssl errors when I try to download data from zenodo (required for creating ROIs)
Troubleshooting this, I am able to make the following unverified server request
(response from server = 200 i.e. OK) So I propose the following changes to make this work:
|
It may also require this
|
Thank you for identifying the cause of the problem, the ssl certification process is failing due to the restricted network. Your solution does work, but it leaves the user vulnerable to Man in the Middle attacks. Luckily, there is another option. We can provide a path to the cer file that we used in the Can you run this simple script and see if it works? Hopefully this takes care of the ssl verification error. All you need to do is:
import requests
# Path to your .cer file
_ = "C:\\Users\\user\\Documents\\DOIRootCA2.cer"
# The URL you want to download the data from
url = "https://zenodo.org/record/7814755/files/global_shoreline_5deg_327.geojson?download=1"
# Use the 'verify' parameter to specify your custom certificate
response = requests.get(url, verify=cert_path)
# Now you can check if this solution worked
print(response)
|
I can confirm that this works on my network. So, going forward, it appears the user will have to provide their certificate path to download any zenodo files. This has to happen for any functionality of the tool (e.g. image downloading). I think this will require modifying existing code in the coastseg package. So I propose the following changes to make this work:
On the first change, is there any disadvantage to providing a new argument to same idea with https://github.com/Doodleverse/CoastSeg/blob/76937f8737cb3944bfab267b7e6f2074c232cc47/src/coastseg/common.py#LL71C1-L71C79, just changing this line The issue is, these would have to be optional arguments. The default would be an empty string I think, because this wont affect all users. |
Hey @dbuscombe-usgs Thanks for trying out the code and I'm happy to hear it works. Thanks for pointing out the code that needed to be changed, I modified each of the functions so that before the request was made the code would check if a file called I added the two new functions to Here is how the
And here are the two new functions in common.py
I can't test this on my computer because I don't have the correct setup. Can you pull the issue_156 branch to your local repository, run |
Hi @2320sharon thanks for this. I will try your proposed workflow today |
So, I've never checked out a specific branch ... what am I doing wrong?
then
? (that doesnt seem to do anything) |
Nevermind, for now I just downloaded the zipped version of the branch. I'll test the new workflow now |
Success!!! Files now download from zenodo. We're back in business - thank you so much @2320sharon ! |
This bug fix has been implemented in coastseg 0.0.71 |
Describe the Question
I can't complete a good install, and am having trouble with pip. Installation instructions #1-#3 run fine; I only encounter the error once I call pip in step #4.
I get an error about SSL:CERTIFICATE_VERIFY_FAILED, however I have ensured I have the right SSL certs loaded (as supported by a successful clone on my computer). Any advice or tips are appreciated.
Screenshots
ALL software version info
Dell Desktop
The text was updated successfully, but these errors were encountered: