Comments (4)
did not work :(
Traceback (most recent call last):
File "send_sms.py", line 7, in
connection = AuthorizedConnection('http://admin:[email protected]/')
File "/usr/lib/python3/dist-packages/huawei_lte_api/AuthorizedConnection.py", line 21, in init
super().init(clear_url, timeout=timeout)
File "/usr/lib/python3/dist-packages/huawei_lte_api/Connection.py", line 40, in init
self.session = requests.Session(verify=False)
TypeError: init() got an unexpected keyword argument 'verify'
BUT, I found this:
psf/requests#1034 (comment)
which states:
Session no longer takes arguments in its constructor. Currently the documentation is out of date on this.
So after adding a verify line right after requests line:
self.session = requests.Session()
self.session.verify = False
Everything worked again ;) thanks for the pointer. Hope it will be moved to the script itself so it will not vanish after upgrades or container reinstall.
from huawei-lte-api.
@ZyXELis hi...
well ~correct way how to fix this is make your OS to trust that certificate... somehow... but quick and dirty fix is to modify this line in /usr/lib/python3/dist-packages/huawei_lte_api/Connection.py
:
and change it to:
self.session = requests.Session(verify=False)
That disables SSL verification and should get you going... i may expose this parameter to the Connection constructor so you can do it from your code...
from huawei-lte-api.
Out of curiosity, would it not be somewhat easier/better in the long run (readability and maintenance wise) to allow sessions
to be a constructor with a default argument for Connection
? I get that d49445b Added kwargs
for applying props to session which is also good
from huawei-lte-api.
Hi, how to restore SSL certificate?
from huawei-lte-api.
Related Issues (20)
- ResponseErrorException: 100006 for hardware CL2E3372HM HOT 8
- Reboot script HOT 1
- Switch Wifi on/off HOT 3
- Exception on log-out ResponseErrorWrongSessionToken: 125003: Wrong Session Token HOT 3
- Issues with multi-part SMS messages (Type 2) HOT 9
- Disabling automatic online updates HOT 3
- Quicksetup HOT 5
- Disabling IPv6 HOT 2
- Can't connect to my modem HOT 4
- Unable to connect to Huawei B535-333 with the error 125003 (Wrong token)
- Toggle VPN status HOT 7
- Can't enable telnet on device HOT 1
- Huawei E8231 also work HOT 1
- Error: 113004 HOT 1
- I ran the example but didn't work HOT 6
- Ping example?
- ussd request example HOT 6
- Accessing device remotely HOT 2
- How to make a basic mac filter ? HOT 10
- E3372 CL1E3372SM Ver.A api doesn't work HOT 4
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 huawei-lte-api.