macOS: TypeError: _log() erhielt ein unerwartetes Schlüsselwortargument 'file'

Teilen Sie hier Ihre Tipps oder Probleme bezüglich der WAPT-Konsole oder des WAPT-Agenten mit
Forumregeln
Community-Forumregeln
* Englischer Support auf www.reddit.com/r/wapt
* Französischer Community-Support ist in diesem Forum verfügbar.
* Bitte kennzeichnen Sie gelöste Themen mit [GELÖST].
* Bitte bearbeiten Sie keine Themen, die mit [GELÖST] markiert sind. Erstellen Sie stattdessen ein neues Thema und verweisen Sie auf das alte.
* Geben Sie die installierte WAPT-Version, die vollständige Versionsnummer und die Build-Nummer (2.2.1.11957 / 2.2.2.12337 / usw.) sowie die Enterprise-/Discovery-Edition an.
* Versionen 1.8.2 und älter werden nicht mehr unterstützt. Fragen zu Version 1.8.2 werden nur beantwortet, wenn sie sich auf ein Upgrade auf eine unterstützte Version (2.1, 2.2 usw.) beziehen.
* Geben Sie das Server-Betriebssystem (Linux/Windows) und die Version (Debian Buster/Bullseye – CentOS 7 – Windows Server 2012/2016/2019) an.
* Geben Sie gegebenenfalls das Betriebssystem des Administrations-/Paketerstellungsrechners und des Rechners mit dem problematischen Agenten an (Windows 7/10/11/Debian 11/etc.).
* Vermeiden Sie es, mehrere Fragen in einem Thema zu stellen, da diese sonst möglicherweise ignoriert werden. Falls mehrere Themen relevant sind, erstellen Sie bitte separate Themen, vorzugsweise nacheinander und nicht gleichzeitig (d. h. vermeiden Sie Spam im Forum).
* Fügen Sie Code-Snippets, Screenshots und andere Bilder direkt in Ihren Beitrag ein. Links zu Pastebin, Bitly und anderen Drittanbieterseiten werden systematisch entfernt.
* Wie in jedem Community-Forum erfolgt die Unterstützung freiwillig durch die Mitglieder. Für kommerziellen Support kontaktieren Sie bitte den Vertrieb von Tranquil IT unter +44 2 40 97 57 55.
Gesperrt
marcolefo
Nachrichten: 27
Anmeldung: 02. Oktober 2018 - 11:13 Uhr

25. Juni 2020 – 20:07 Uhr

Guten Morgen,

Ich teste die Installation des Agenten 1.8.2.7265 unter macOS 10.15.5

Es stürzt während der Registrierung ab. Ich vermute, es liegt an der Python-Version. Ich poste das hier, falls es weiterhilft.
Aber wenn sich das Problem lösen lässt, bin ich voll dafür ;)

Guten Abend

Code: Alle auswählen

# python --version 
Python 2.7.16
# wapt-get register -l debug
2020-06-25 19:55:22,220 DEBUG Default encoding : ascii 
2020-06-25 19:55:22,220 DEBUG Setting encoding for stdout and stderr to UTF-8 
2020-06-25 19:55:22,220 DEBUG Python path ['/opt/wapt', '/opt/wapt', '/opt/wapt/lib/python27.zip', '/opt/wapt/lib/python2.7', '/opt/wapt/lib/python2.7/plat-darwin', '/opt/wapt/lib/python2.7/plat-mac', '/opt/wapt/lib/python2.7/plat-mac/lib-scriptpackages', '/opt/wapt/lib/python2.7/lib-tk', '/opt/wapt/lib/python2.7/lib-old', '/opt/wapt/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/opt/wapt/lib/python2.7/site-packages']
2020-06-25 19:55:22,220 INFO Using local waptservice configuration /opt/wapt/wapt-get.ini 
2020-06-25 19:55:22,220 DEBUG Config file: /opt/wapt/wapt-get.ini
Using config file: /opt/wapt/wapt-get.ini
2020-06-25 19:55:22,224 DEBUG Thread 4514852288 is connecting to wapt db
2020-06-25 19:55:22,228 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:22,253 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:22,256 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:22,392 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:22,421 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:22,448 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:22,450 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:22,585 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:22,589 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:22,625 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:22,626 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:22,755 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:22,760 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:22,784 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:22,786 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:22,918 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:22,920 DEBUG Using host certificate /opt/wapt/private/A35C8C6C-FDCE-5F1F-BDF6-E83297815CB9.pem for repo global auth
2020-06-25 19:55:22,922 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:22,945 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:22,946 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:23,074 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:23,078 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:23,100 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:23,101 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:23,234 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:23,237 DEBUG Thread 4514852288 is connecting to wapt db
2020-06-25 19:55:23,237 DEBUG DB Start transaction
2020-06-25 19:55:23,238 DEBUG DB commit
2020-06-25 19:55:23,242 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:23,263 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:23,264 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:23,447 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:23,452 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:23,474 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:23,478 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:23,614 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:23,619 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:23,644 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:23,646 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:23,775 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:23,780 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:23,803 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:23,804 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:23,939 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:23,942 DEBUG Using host certificate /opt/wapt/private/A35C8C6C-FDCE-5F1F-BDF6-E83297815CB9.pem for repo wapt auth
2020-06-25 19:55:23,943 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:23,966 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:23,967 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:24,104 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:24,109 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:24,131 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:24,132 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:24,265 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:24,268 INFO Main repository: https://wapt.domain/wapt
2020-06-25 19:55:24,271 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:24,295 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:24,297 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:24,426 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:24,429 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:24,450 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:24,452 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:24,587 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:24,593 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:24,614 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:24,615 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:24,743 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:24,747 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:24,770 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:24,772 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:24,904 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:24,908 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:24,932 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:24,934 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:25,064 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:25,069 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:25,092 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:25,094 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:25,224 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:25,226 DEBUG Using host certificate /opt/wapt/private/A35C8C6C-FDCE-5F1F-BDF6-E83297815CB9.pem for repo wapt-host auth
2020-06-25 19:55:25,228 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:25,251 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:25,252 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:25,382 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:25,386 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:25,410 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:25,411 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:25,535 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:25,538 INFO User Groups:[]
2020-06-25 19:55:25,538 DEBUG WAPT base directory : /opt/wapt
2020-06-25 19:55:25,538 DEBUG Package cache dir : /opt/wapt/cache
2020-06-25 19:55:25,538 DEBUG WAPT DB Structure version;: 20200415
Registering host against server: https://wapt.domain/
2020-06-25 19:55:25,538 DEBUG DB Start transaction
2020-06-25 19:55:25,539 DEBUG DB commit
2020-06-25 19:55:25,545 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:25,571 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:25,572 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:25,707 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:25,709 DEBUG DB Start transaction
2020-06-25 19:55:25,709 DEBUG DB commit
2020-06-25 19:55:25,711 DEBUG DB Start transaction
2020-06-25 19:55:25,711 DEBUG DB commit
2020-06-25 19:55:25,724 INFO Run "route get default"
2020-06-25 19:55:25,738 INFO route get default command returns code 0
2020-06-25 19:55:26,885 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:26,911 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:26,912 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:27,042 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:27,045 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:27,175 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:27,246 DEBUG DB Start transaction
2020-06-25 19:55:27,250 DEBUG DB commit
2020-06-25 19:55:27,253 DEBUG Stores cert chain check in cache
2020-06-25 19:55:27,257 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:27,281 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:27,282 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:27,413 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:27,420 INFO Run "dmidecode -q 2>/dev/null"
2020-06-25 19:55:27,443 INFO dmidecode -q 2>/dev/null command returns code 0
2020-06-25 19:55:27,444 INFO Run "system_profiler SPHardwareDataType -xml"
2020-06-25 19:55:27,579 INFO system_profiler SPHardwareDataType -xml command returns code 0
2020-06-25 19:55:27,585 INFO Run "file /Applications/VLC.app/Contents/Info.plist"
2020-06-25 19:55:27,600 INFO file /Applications/VLC.app/Contents/Info.plist command returns code 0
2020-06-25 19:55:27,630 INFO Run "file /Applications/nextcloud.app/Contents/Info.plist"
2020-06-25 19:55:27,653 INFO file /Applications/nextcloud.app/Contents/Info.plist command returns code 0
FATAL ERROR : TypeError: _log() got an unexpected keyword argument 'file'
Traceback (most recent call last):
  File "/opt/wapt//wapt-get.py", line 1462, in <module>
    main()
  File "/opt/wapt//wapt-get.py", line 1241, in main
    description=(" ".join(args[1:])).decode(sys.getfilesystemencoding()),
  File "/opt/wapt/common.py", line 5621, in register_computer
    inv = self._get_host_status_data(old_hashes, new_hashes, force=True, include_dmi=True, include_wmi=True)
  File "/opt/wapt/common.py", line 5945, in _get_host_status_data
    _add_data_if_updated(inv,'installed_softwares',self.merge_installed_softwares_and_wua_list(),old_hashes,new_hashes)
  File "/opt/wapt/common.py", line 6110, in merge_installed_softwares_and_wua_list
    soft_inventory = setuphelpers.installed_softwares()
  File "/opt/wapt/setuphelpers_macos.py", line 433, in installed_softwares
    logger.warning("Application data acquisition failed for {} :".format(plist_file), file=sys.stderr)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 1186, in warning
    self._log(WARNING, msg, args, **kwargs)
TypeError: _log() got an unexpected keyword argument 'file'
WAPT Enterprise Server: 2.6.0.17343 / Server-Betriebssystem: Debian Bookworm /
Betriebssystem des Administrations-/Paketerstellungsrechners: macOS 15
Benutzeravatar
Sfonteneau
WAPT-Experte
Nachrichten: 2322
Registriert: 10. Juli 2014 - 23:52 Uhr
Kontakt:

25. Juni 2020 – 22:20 Uhr

scheint ein Problem mit der Nextcloud-Anwendung während der Inventarisierung zu geben (ich bin mir aber nicht sicher).

Wir müssen während der Inventarisierung einen try-except-Block verwenden, um einen Absturz zu verhindern.

Ich werde Nextcloud auf dem Mac installieren, um zu sehen, ob das die Ursache ist,

Simon.
Benutzeravatar
Sfonteneau
WAPT-Experte
Nachrichten: 2322
Registriert: 10. Juli 2014 - 23:52 Uhr
Kontakt:

25. Juni 2020 – 22:48 Uhr

Tatsächlich benötigt der Code eine kleine Anpassung:

In der Datei /opt/wapt/setuphelpers_macos.py, Zeile 433

Code: Alle auswählen

else:
            #logger.warning("Application data acquisition failed for {} :".format(plist_file), file=sys.stderr)
            logger.warning("Application data acquisition failed for {} :".format(plist_file))
Die Nextcloud-Anwendung hat anscheinend keinen CFBundleName
https://developer.apple.com/documentati ...bundlename
MisterP
Nachrichten: 6
Anmeldung: 28. Mai 2020 - 12:10 Uhr

2. Juli 2020 – 15:13 Uhr

Hallo,

ich habe tatsächlich dasselbe Problem; die Änderung der entsprechenden Zeile behebt es.
Gibt es eine Version, die die Korrektur direkt enthält?


Vielen Dank.
Gesperrt