{"action":"created","issue":{"url":"https://api.github.com/repos/pyldap/pyldap/issues/68","repository_url":"https://api.github.com/repos/pyldap/pyldap","labels_url":"https://api.github.com/repos/pyldap/pyldap/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/pyldap/pyldap/issues/68/comments","events_url":"https://api.github.com/repos/pyldap/pyldap/issues/68/events","html_url":"https://github.com/pyldap/pyldap/issues/68","id":196888552,"number":68,"title":"*** TypeError: ('expected a string in the list',..","user":{"login":"sivanbecker","id":20453622,"avatar_url":"https://avatars.githubusercontent.com/u/20453622?v=3","gravatar_id":"","url":"https://api.github.com/users/sivanbecker","html_url":"https://github.com/sivanbecker","followers_url":"https://api.github.com/users/sivanbecker/followers","following_url":"https://api.github.com/users/sivanbecker/following{/other_user}","gists_url":"https://api.github.com/users/sivanbecker/gists{/gist_id}","starred_url":"https://api.github.com/users/sivanbecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sivanbecker/subscriptions","organizations_url":"https://api.github.com/users/sivanbecker/orgs","repos_url":"https://api.github.com/users/sivanbecker/repos","events_url":"https://api.github.com/users/sivanbecker/events{/privacy}","received_events_url":"https://api.github.com/users/sivanbecker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-21T09:48:15Z","updated_at":"2016-12-21T15:39:00Z","closed_at":null,"body":"Hi,\r\n\r\ni'm working on a tool web based (only backend) that will handle all dhcp/ldap stuff in the place i work. i've encountered this error when trying to add a new entry to ldap.\r\ni know that with python2 and python-ldap this code works fine. but i'm trying to implement the same with pyldap and python3.\r\n\r\nthe error i get is: \"*** TypeError: ('expected a string in the list', <the value here changes each time i run this>)\r\n\r\nthe line of code i'm running and that fails:\r\n```\r\ncurrent_app.ldap_obj.add_s(self.dn(), modlist.addModlist(self.modlist()))\r\n```\r\nwhere:\r\n\r\n* **current_app.ldap_obj** is ldap.ldapobject.SimpleLDAPObject\r\n\r\n* **self.dn()** = 'cn=h1,cn=testgroup1,ou=Groups,cn=DHCP Config,cn=dhcpsrv,dc=dhcpawn,dc=net'\r\n***modlist.addModlist(self.modlist())** = [('objectClass', ['dhcpHost', 'top']), ('cn', 'h1'), ('dhcpHWAddress', ['ethernet 00:01:C0:0E:9D:e8'])]\r\n\r\nin this case this is the exact exception i get:\r\n*** TypeError: ('expected a string in the list', 'dhcpHost')\r\n\r\nplease let me know if you need mode data from me, i'd love to get some help here.\r\n\r\nthanks\r\nSivan"},"comment":{"url":"https://api.github.com/repos/pyldap/pyldap/issues/comments/268553579","html_url":"https://github.com/pyldap/pyldap/issues/68#issuecomment-268553579","issue_url":"https://api.github.com/repos/pyldap/pyldap/issues/68","id":268553579,"user":{"login":"xor-xor","id":2082842,"avatar_url":"https://avatars.githubusercontent.com/u/2082842?v=3","gravatar_id":"","url":"https://api.github.com/users/xor-xor","html_url":"https://github.com/xor-xor","followers_url":"https://api.github.com/users/xor-xor/followers","following_url":"https://api.github.com/users/xor-xor/following{/other_user}","gists_url":"https://api.github.com/users/xor-xor/gists{/gist_id}","starred_url":"https://api.github.com/users/xor-xor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xor-xor/subscriptions","organizations_url":"https://api.github.com/users/xor-xor/orgs","repos_url":"https://api.github.com/users/xor-xor/repos","events_url":"https://api.github.com/users/xor-xor/events{/privacy}","received_events_url":"https://api.github.com/users/xor-xor/received_events","type":"User","site_admin":false},"created_at":"2016-12-21T15:39:00Z","updated_at":"2016-12-21T15:39:00Z","body":"@sivanbecker - I came here because of the same error - converting values to lists of bytestrings (as per https://github.com/pyldap/pyldap/issues/48) helped me, so maybe it will help you as well."}}
{"actor":{"display_login":"xor-xor"}}