macOS: TypeError: _log() obtuvo un argumento de palabra clave inesperado 'archivo'

Comparta sus sugerencias o problemas relacionados con la consola WAPT o el agente WAPT aquí
Reglas del foro
Reglas del foro de la comunidad
* Soporte en inglés en www.reddit.com/r/wapt
* El soporte de la comunidad en francés está disponible en este foro
* Por favor, anteponga [RESUELTO] al título del tema si está resuelto.
* Por favor, no edite un tema que esté etiquetado como [RESUELTO]. Abra un nuevo tema haciendo referencia al anterior.
* Especifique la versión de WAPT instalada, la versión completa y el número de compilación (2.2.1.11957 / 2.2.2.12337 / etc.), así como la edición Enterprise/Discovery.
* Las versiones 1.8.2 y anteriores ya no son compatibles. Las únicas preguntas aceptadas sobre la versión 1.8.2 están relacionadas con la actualización a una versión compatible (2.1, 2.2, etc.).
* Especifique el sistema operativo del servidor (Linux/Windows) y la versión (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Especifique el sistema operativo de la máquina de administración/creación de paquetes y de la máquina con el agente problemático, si corresponde (Windows 7/10/11/Debian 11/etc.).
* Evite hacer varias preguntas al abrir un tema, ya que podría ser ignorado. Si hay varios temas, ábralos por separado, preferiblemente uno tras otro y no todos a la vez (es decir, no sature el foro con spam).
* Incluya fragmentos de código, capturas de pantalla y otras imágenes directamente en la publicación. Los enlaces a Pastebin, Bitly y otros sitios de terceros serán eliminados sistemáticamente.
* Como en cualquier foro comunitario, el soporte es proporcionado voluntariamente por los miembros. Si necesita soporte comercial, puede comunicarse con el departamento de ventas de Tranquil IT al 02.40.97.57.55.
Bloqueado
Marcolefo
Mensajes: 27
Inscripción: 02 oct 2018 - 11:13

25 de junio de 2020 - 20:07

Buen día,

Estoy probando la instalación del agente 1.8.2.7265 en macOS 10.15.5

Se bloquea durante el registro. Supongo que es un problema de la versión de Python. Lo publico aquí por si sirve de ayuda.
Pero si se puede solucionar, estoy totalmente a favor ;)

Buenas noches

Código: Seleccionar todo

# 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'
Servidor WAPT Enterprise: 2.6.0.17343 / Sistema operativo del servidor: Debian bookworm /
Sistema operativo de la máquina de administración/creación de paquetes: macOS 15
Avatar de usuario
Sfonteneau
Experto en WAPT
Mensajes: 2312
Registrado: 10 de julio de 2014 - 23:52
Contacto :

25 de junio de 2020 - 22:20

Parece haber un problema durante el proceso de inventario con la aplicación Nextcloud (no estoy seguro).

Necesitamos usar un bloque try-except durante el inventario para evitar que falle.

Voy a instalar Nextcloud en Mac para ver si ese es el problema,

Simon.
Avatar de usuario
Sfonteneau
Experto en WAPT
Mensajes: 2312
Registrado: 10 de julio de 2014 - 23:52
Contacto :

25 de junio de 2020 - 22:48

De hecho, el código necesita un pequeño parche:

En el archivo /opt/wapt/setuphelpers_macos.py, línea 433

Código: Seleccionar todo

else:
            #logger.warning("Application data acquisition failed for {} :".format(plist_file), file=sys.stderr)
            logger.warning("Application data acquisition failed for {} :".format(plist_file))
La aplicación Nextcloud aparentemente no tiene un CFBundleName
https://developer.apple.com/documentati ...nombre del paquete
Señor P
Mensajes: 6
Inscripción: 28 de mayo de 2020 - 12:10

2 de julio de 2020 - 15:13

Hola,

yo también tengo el mismo problema; modificar la línea lo soluciona.
¿Tienes alguna versión que incluya la solución directamente?


Gracias.
Bloqueado