erayerdin / pyairmore

PyAirmore is a Python client library for Android Airmore server, which helps the developers to take programmatic actions on Android.
Other
32 stars 9 forks source link

Problem for starting with pyairmore #23

Closed JosephGilles closed 2 years ago

JosephGilles commented 2 years ago

Hi everybody I have a problem with my first test with pyairmore, my program

from ipaddress import IPv4Address from pyairmore.request import AirmoreSession from pyairmore.services.messaging import MessageRequestGSMError, MessagingService

ip = IPv4Address("192.168.0.145") session = AirmoreSession(ip) service = MessagingService(session)

try: service.send_message("+32xxxxxxxxx","Hello") except MessageRequestGSMError: print("Error")

But when I start is, I have this error :

PS C:\Users\Joseph\Desktop\Test Python> & C:/Users/Joseph/AppData/Local/Microsoft/WindowsApps/python3.10.exe "c:/Users/Joseph/Desktop/Test Python/Envoi.py" Traceback (most recent call last): File "c:\Users\Joseph\Desktop\Test Python\Envoi.py", line 10, in service.send_message("+32xxxxxxxxx","Hello") File "C:\Users\Joseph\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyairmore\services\messaging.py", line 107, in send_message
response = self.session.send(request) File "C:\Users\Joseph\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyairmore\request__init__.py", line 157, in send is_authorized = self.request_authorization() File "C:\Users\Joseph\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyairmore\request__init.py", line 135, in request_authorization response = self.send(request, False) File "C:\Users\Joseph\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyairmore\request\init__.py", line 162, in send return super().send(request, **kwargs) File "C:\Users\Joseph\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\sessions.py", line 636, in send kwargs.setdefault('proxies', self.rebuild_proxies(request, self.proxies)) File "C:\Users\Joseph\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\sessions.py", line 301, in rebuild_proxies if 'Proxy-Authorization' in headers: TypeError: argument of type 'NoneType' is not iterable

I have removed my phone number (xxxx) but it correct in my program. In GoogleChrome all it's ok with the android phone

Thank you for your help and sorry for my English :-) .. Joseph

erayerdin commented 2 years ago

It's been a long time since I've updated the project. You can consider it abandoned.