Ticket #1212 (assigned defect)

Opened 14 years ago

Last modified 13 years ago

error with CPSRemoteController and acute characters

Reported by: juan.lago@… Owned by: tziade
Priority: P2 Milestone: CPS 3.5.7
Component: CPSRemoteController Version: 3.3.8
Severity: normal Keywords: acute characters
Cc: juan.lago@…


When adding a long amount of users in CPS from a Python script using CPSRemoteController, I get the following error when I call the 'addMember' Method. I think the problem is about the Spanish characters with acute accents (e.g., áéíóúñÑÁÉÍÓÚ) and the xmlrpclib. With 'normal' characters, the script works well.

Traceback (most recent call last):
  File "remote_cps.py", line 44, in ?
  File "remote_cps.py", line 40, in loadUsers
    test_addMember(userId, pwd, firstName, lastName, email)
  File "remote_cps.py", line 19, in test_addMember
    proxy.addMember(userId, userPassword, userRoles, email, firstName, lastName)
  File "/usr/lib/python2.4/xmlrpclib.py", line 1096, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.4/xmlrpclib.py", line 1383, in __request
  File "/usr/lib/python2.4/xmlrpclib.py", line 1137, in request

xmlrpclib.!ProtocolError: <!ProtocolError for user:pwd@www.myexampledomain.org/cps/portal_remote_controller: 500 Internal Server Error>

The main source code follows:

service = 'http://%s:%s@%s/%s/portal_remote_controller' % (user, pwd, server, portal, )
proxy = ServerProxy(service)
userRoles = ('Member',)
proxy.addMember(userId, userPassword, userRoles, email, firstName, lastName)

Change History

comment:1 Changed 14 years ago by fguillaume

  • Milestone changed from CPS 3.3.8 to CPS 3.4.0

comment:2 Changed 13 years ago by fguillaume

  • Cc juan.lago@… added

Juan, is your data encoded as latin-1 or something in a str, or are you passing a unicode string? Also could you find what error is logged on the server? In the ZMI error_log if needed, or in log/event.log.

comment:3 Changed 13 years ago by tziade

  • Owner changed from rspivak to tziade
  • Cc juan.lago@… removed
  • Status changed from new to assigned

comment:4 Changed 13 years ago by tziade

  • Cc juan.lago@… added

replaced the CC

comment:5 Changed 13 years ago by tziade

I've tried funny names with both unicode and string, as this depends on your RPC client, and it works fine.

Beware that the userid param must be 100% ascii [AZ-az-09]

do you have the entry that brakes ?

comment:6 Changed 13 years ago by tziade

  • Priority changed from P1 to P2
  • Milestone changed from CPS 3.4.0 to CPS 3.4.1

comment:7 Changed 13 years ago by sfermigier

  • Milestone changed from CPS 3.4.1 to CPS 3.4.2
Note: See TracTickets for help on using tickets.