Projet

Général

Profil

Tâche #29856

Scénario #29650: Faire fonctionner Zéphir-web + GenConfig en 2.8.0

Porter enregistrement Zéphir en python 3

Ajouté par Emmanuel GARETTE il y a environ 4 ans. Mis à jour il y a presque 4 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Début:
02/04/2020
Echéance:
% réalisé:

100%

Temps estimé:
0.00 h
Restant à faire (heures):
0.0

Révisions associées

Révision 3a3220f3 (diff)
Ajouté par Emmanuel GARETTE il y a environ 4 ans

partage de enregistrement_zephir en python3 (ref #29856)

Révision ba408ab1 (diff)
Ajouté par Emmanuel GARETTE il y a environ 4 ans

la cle peut etre envoyé depuis le client (ref #29856)

Révision d4dd1bbf (diff)
Ajouté par Emmanuel GARETTE il y a environ 4 ans

pirtage de enregistrement_zephir en python3 (ref #29856)

Révision e3718a7c (diff)
Ajouté par Emmanuel GARETTE il y a environ 4 ans

encodestring => encodebytes (ref #29856)

Révision b5b57741 (diff)
Ajouté par Emmanuel GARETTE il y a presque 4 ans

problème d'encodage (ref #29856)

Révision b50b1858 (diff)
Ajouté par Emmanuel GARETTE il y a presque 4 ans

problème d'encodage (ref #29856)

Historique

#1 Mis à jour par Emmanuel GARETTE il y a environ 4 ans

  • Statut changé de Nouveau à En cours

#2 Mis à jour par Joël Cuissinat il y a environ 4 ans

  • Statut changé de En cours à Résolu
  • Tâche parente changé de #29650 à #29732

#3 Mis à jour par Joël Cuissinat il y a environ 4 ans

  • Tâche parente changé de #29732 à #29650

#4 Mis à jour par Fabrice Barconnière il y a environ 4 ans

  • Statut changé de Résolu à En cours

#5 Mis à jour par Fabrice Barconnière il y a environ 4 ans

Enregistrement Zéphir d'un Sphynx 2.8.0 :

module (sphynx-2.8.0 par défaut): 

** liste des variantes de ce module **

95 * standard                                                                                                                                                                                 

variante (95 par défaut): 

** Configuration des communications vers le serveur Zéphir **

Traceback (most recent call last):
  File "/usr/bin/enregistrement_zephir", line 998, in <module>
    main(args.pppoe, args.force, args.adresse_zephir, args.user, args.password, args.id_serveur, args.choix, args.force_enregistrement)
  File "/usr/bin/enregistrement_zephir", line 886, in main
    id_serveur = conf_uucp(zephir_proxy, adresse_zephir, user, user_perms, id_serveur, choix, force_enregistrement)
  File "/usr/bin/enregistrement_zephir", line 544, in conf_uucp
    config_data = xmlrpclib.base64.decodebytes(resultat[2].data).decode()
AttributeError: 'str' object has no attribute 'data'

#6 Mis à jour par Emmanuel GARETTE il y a environ 4 ans

  • Statut changé de En cours à Résolu
  • % réalisé changé de 0 à 100

#7 Mis à jour par Fabrice Barconnière il y a environ 4 ans

  • Statut changé de Résolu à Fermé
  • Restant à faire (heures) mis à 0.0

#8 Mis à jour par Fabrice Barconnière il y a environ 4 ans

  • Statut changé de Fermé à En cours
  • Temps estimé mis à 0.00 h

#9 Mis à jour par Fabrice Barconnière il y a environ 4 ans

Erreur si relance l'enregistrement_zephir :
En ajoutant ces 2 lignes avant lexception ligne 523 de enregistrement_zephir :

import traceback
traceback.print_exc()

On obtient ceci

Traceback (most recent call last):
  File "/usr/lib/python3.8/base64.py", line 510, in _input_type_check
    m = memoryview(s)
TypeError: memoryview: a bytes-like object is required, not 'str'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/enregistrement_zephir", line 403, in conf_uucp
    resultat = convert(zephir_proxy.serveurs.get_conf_uucp(id_serveur, xmlrpclib.base64.encodestring(cle_pub), hw_infos))
  File "/usr/lib/python3.8/base64.py", line 540, in encodestring
    return encodebytes(s)
  File "/usr/lib/python3.8/base64.py", line 527, in encodebytes
    _input_type_check(s)
  File "/usr/lib/python3.8/base64.py", line 513, in _input_type_check
    raise TypeError(msg) from err
TypeError: expected bytes-like object, not str

En corrigeant les cle_pub en cle_pub.ecnode(), on obtient un autre traceback :

Traceback (most recent call last):
  File "/usr/bin/enregistrement_zephir", line 403, in conf_uucp
    resultat = convert(zephir_proxy.serveurs.get_conf_uucp(id_serveur, xmlrpclib.base64.encodebytes(cle_pub.encode()), hw_infos))
  File "/usr/lib/python3.8/xmlrpc/client.py", line 1109, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python3/dist-packages/zephir/eolerpclib.py", line 95, in __request
    response = self.__transport.request(
  File "/usr/lib/python3.8/xmlrpc/client.py", line 1153, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python3.8/xmlrpc/client.py", line 1169, in single_request
    return self.parse_response(resp)
  File "/usr/lib/python3.8/xmlrpc/client.py", line 1341, in parse_response
    return u.close()
  File "/usr/lib/python3.8/xmlrpc/client.py", line 655, in close
    raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault 8002: "Can't serialize output: cannot marshal None unless allow_none is enabled">

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/enregistrement_zephir", line 415, in conf_uucp
    resultat = convert(zephir_proxy.serveurs.get_conf_uucp(id_serveur, xmlrpclib.base64.encodebytes(cle_pub.encode())))
  File "/usr/lib/python3.8/xmlrpc/client.py", line 1109, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python3/dist-packages/zephir/eolerpclib.py", line 95, in __request
    response = self.__transport.request(
  File "/usr/lib/python3.8/xmlrpc/client.py", line 1153, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python3.8/xmlrpc/client.py", line 1169, in single_request
    return self.parse_response(resp)
  File "/usr/lib/python3.8/xmlrpc/client.py", line 1341, in parse_response
    return u.close()
  File "/usr/lib/python3.8/xmlrpc/client.py", line 655, in close
    raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault 8002: "Can't serialize output: cannot marshal None unless allow_none is enabled">

#10 Mis à jour par Emmanuel GARETTE il y a presque 4 ans

  • Statut changé de En cours à Résolu

#11 Mis à jour par Fabrice Barconnière il y a presque 4 ans

OK.
J'ai apporté les correctifs sur les warnings manage_service : #30050

#12 Mis à jour par Fabrice Barconnière il y a presque 4 ans

  • Statut changé de Résolu à Fermé

Formats disponibles : Atom PDF