Project

General

Profile

Tâche #29856

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

Porter enregistrement Zéphir en python 3

Added by Emmanuel GARETTE over 2 years ago. Updated over 2 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
04/02/2020
Due date:
% Done:

100%

Estimated time:
0.00 h
Remaining (hours):
0.0

Associated revisions

Revision 3a3220f3 (diff)
Added by Emmanuel GARETTE over 2 years ago

partage de enregistrement_zephir en python3 (ref #29856)

Revision ba408ab1 (diff)
Added by Emmanuel GARETTE over 2 years ago

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

Revision d4dd1bbf (diff)
Added by Emmanuel GARETTE over 2 years ago

pirtage de enregistrement_zephir en python3 (ref #29856)

Revision e3718a7c (diff)
Added by Emmanuel GARETTE over 2 years ago

encodestring => encodebytes (ref #29856)

Revision b5b57741 (diff)
Added by Emmanuel GARETTE over 2 years ago

problème d'encodage (ref #29856)

Revision b50b1858 (diff)
Added by Emmanuel GARETTE over 2 years ago

problème d'encodage (ref #29856)

History

#1 Updated by Emmanuel GARETTE over 2 years ago

  • Status changed from Nouveau to En cours

#2 Updated by Joël Cuissinat over 2 years ago

  • Status changed from En cours to Résolu
  • Parent task changed from #29650 to #29732

#3 Updated by Joël Cuissinat over 2 years ago

  • Parent task changed from #29732 to #29650

#4 Updated by Fabrice Barconnière over 2 years ago

  • Status changed from Résolu to En cours

#5 Updated by Fabrice Barconnière over 2 years ago

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 Updated by Emmanuel GARETTE over 2 years ago

  • Status changed from En cours to Résolu
  • % Done changed from 0 to 100

#7 Updated by Fabrice Barconnière over 2 years ago

  • Status changed from Résolu to Fermé
  • Remaining (hours) set to 0.0

#8 Updated by Fabrice Barconnière over 2 years ago

  • Status changed from Fermé to En cours
  • Estimated time set to 0.00 h

#9 Updated by Fabrice Barconnière over 2 years ago

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 Updated by Emmanuel GARETTE over 2 years ago

  • Status changed from En cours to Résolu

#11 Updated by Fabrice Barconnière over 2 years ago

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

#12 Updated by Fabrice Barconnière over 2 years ago

  • Status changed from Résolu to Fermé

Also available in: Atom PDF