#python #pyinstaller #zeep
#python #pyinstaller #zeep
Вопрос:
Моя среда: python 3.8, zeep 4.0, pyinstaller 4.1
Когда я использовал pyinstaller для передачи name.exe , это успешно, но это не работа.
и это мой код:
from zeep import Client
from zeep.cache import SqliteCache
from zeep.transports import Transport
from zeep.plugins import HistoryPlugin
from requests import Session
from requests.auth import HTTPBasicAuth
from urllib3 import disable_warnings
from urllib3.exceptions import InsecureRequestWarning
import osenter
disable_warnings(InsecureRequestWarning)
username = 'test'
password = 'test'
host = '192.168.200.201'
wsdl = 'AXLAPI.wsdl'
location = 'https://{host}:8443/axl/'.format(host=host)
binding = "{http://www.cisco.com/AXLAPIService/}AXLAPIBinding"
session = Session()
session.verify = False
session.auth = HTTPBasicAuth(username, password)
transport = Transport(cache=SqliteCache(), session=session, timeout=20)
history = HistoryPlugin()
client = Client(wsdl=wsdl, transport=transport, plugins=[history])
service = client.create_service(binding, location)
os.system("pause")
try:
partition_resp = service.listPhone(
searchCriteria={'name': 'CSF571130'}, returnedTags={'name': '', 'userLocale': '', 'phoneTemplateName': '', 'singleButtonBarge': '', 'numberOfButtons': '', 'model': '', 'product': '', 'ownerUserName': '', 'class': '', 'commonPhoneConfigName': '', 'securityProfileName': '', 'sipProfileName': '', 'softkeyTemplateName': '', 'devicePoolName': '', 'locationName': '', 'builtInBridgeStatus': '', 'useTrustedRelayPoint': '', 'certificateOperation': '', 'deviceMobilityMode': '', 'protocol': '', 'protocolSide': ''})
print(partition_resp)
except:
print('no')
Ответ №1:
Насколько я знаю, Pyinstaller не поддерживает Python 3.8. Я знаю, что люди хотели добавить поддержку, но я не знаю, удалось ли им и / или он был выпущен. Поэтому я думаю, что это может быть причиной, по которой он у вас не работает.
Комментарии:
1. спасибо за ваш ответ, но pyinstaller 4.1 добавляет поддержку python3.8