Comments (4)
I changed inside the requestor.py
the verify. So I set verify=True
to verify=False
.
But that deliveries me ValueError: Cannot set verify_mode to CERT_NONE when check_hostname is enabled.
I also tried to disable check_hostname with
import ssl
import urllib.request
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
from easypost-python.
There is not currently an option to disable SSL verification as this could lead to man-in-the-middle attacks and is not something we will support. If you absolutely need this, you could of course disable it by setting verify=False
in the code and building from source like you have.
It sounds like you have a local invalid or self-signed certificate on the computer you are running your code from, is that correct? If so, the best fix is to actually fix the certificate issue (outside the scope of the support we can provide here). I also noticed you are running Anaconda
, how did you install our library?
Finally, per the issue template for this project which you did not use, we need more information to assist. What kind of request were you making (appears to be a Shipment create request)? What version of the library is in use? What steps can we try to recreate the issue (does this happen on every request or just some)? Based on the file paths in what you shared, it looks like you are running this on Windows, is that correct?
from easypost-python.
Thank you for the answer. verify = False
returns another error and that is ValueError: Cannot set verify_mode to CERT_NONE when check_hostname is enabled.
.
I installed the library under Anconda with pip install easypost
.
I have the following requirements:
- Request
shipment.buy(rate=shipment.lowest_rate())
(example code see above) - Windows 10
- Anaconda conda 4.13.0
- Python 3.9.7
from easypost-python.
Disabling the check_hostname
is not something that the requests
library lets you do natively. You would need to build a urllib
wrapper to be able to do this. Some potential resources:
As this issue falls outside the scope of our library and is related with the urllib/requests
libraries, I'm going to close it. I would highly encourage fixing the SSL issue at the root instead of trying to disable it as it's an insecure method of working with APIs. Otherwise hopefully some of the above StackOverflow questions should point you in the right direction. Alternatively you could raise an issue on their GitHub pages instead on how to properly do this. Best of luck!
from easypost-python.
Related Issues (20)
- Transliteration of non-roman text HOT 1
- Shipment.create error message with no details HOT 2
- Error Handling Around Customs Items Not Exposing Proper Message HOT 4
- Encode Bodies as JSON Instead of urlencoding
- Adapter max_retries initialization won't work for older requests library that might be installed HOT 8
- Testing in local appengine environment causes non-test-failure errors
- VCR playback appears to mask errors HOT 4
- Tracker create_list() function keeps retuning a 403 HOT 7
- Investigate if this error occurs for other objects/fields or is only for this one field `customs_item['description']`
- Adding Insurance Throwing A Circular Import Error HOT 4
- [Bug]: Looking for easypost.beta HOT 3
- Swap Update Brand, Carrier, User, and Webhook Endpoints to use PATCH HTTP Method HOT 1
- Update Partner White Label Tests to Account for New `has_more` and `referral_customers` keys HOT 1
- [Bug]: trouble using tax_identifiers on each shipment of an order. HOT 1
- [Bug]: Problem Getting a report that was previously created. HOT 1
- [Bug]: easypost.Event.retrieve_all_payloads results in AttributeError: type object 'Payload' has no attribute 'construct_from' HOT 3
- [Bug]: AttributeError: EndShipper object has no attribute _unsaved_values HOT 10
- [Feat]: Upgrade Guide HOT 1
- [Bug]: `ShipmentService.regenerate_rates` has incorrect return value type HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easypost-python.