{"action":"created","issue":{"url":"https://api.github.com/repos/cannatag/ldap3/issues/255","repository_url":"https://api.github.com/repos/cannatag/ldap3","labels_url":"https://api.github.com/repos/cannatag/ldap3/issues/255/labels{/name}","comments_url":"https://api.github.com/repos/cannatag/ldap3/issues/255/comments","events_url":"https://api.github.com/repos/cannatag/ldap3/issues/255/events","html_url":"https://github.com/cannatag/ldap3/issues/255","id":188831103,"number":255,"title":"Issues with notFilter","user":{"login":"andreif","id":259691,"avatar_url":"https://avatars.githubusercontent.com/u/259691?v=3","gravatar_id":"","url":"https://api.github.com/users/andreif","html_url":"https://github.com/andreif","followers_url":"https://api.github.com/users/andreif/followers","following_url":"https://api.github.com/users/andreif/following{/other_user}","gists_url":"https://api.github.com/users/andreif/gists{/gist_id}","starred_url":"https://api.github.com/users/andreif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreif/subscriptions","organizations_url":"https://api.github.com/users/andreif/orgs","repos_url":"https://api.github.com/users/andreif/repos","events_url":"https://api.github.com/users/andreif/events{/privacy}","received_events_url":"https://api.github.com/users/andreif/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-11T19:21:57Z","updated_at":"2016-11-11T20:15:25Z","closed_at":null,"body":"If one of `NamedTypes().__namedTypes` is `notFilter`, then `getTagMap()` fails due to `nt.getType().getTagMap()` being `None`. Is it `pyasn1`'s issue or `ldap3`'s one?\r\n\r\n`nt.getType()` returns `ldap3.protocol.rfc4511.Not` instance which is impossible to print with Python 3.5:\r\n```py\r\n  File \"/Users/andrei/.pyenv/versions/ldap/lib/python3.5/site-packages/pyasn1/type/namedtype.py\", line 148, in getTagMap\r\n    print(nt.getType())\r\n  File \"/Users/andrei/.pyenv/versions/ldap/lib/python3.5/site-packages/pyasn1/type/univ.py\", line 452, in __str__\r\n    def __str__(self): return self._value.decode(self._encoding, 'ignore')\r\n  File \"/Users/andrei/.pyenv/versions/ldap/lib/python3.5/site-packages/pyasn1/type/base.py\", line 57, in __getattr__\r\n    raise error.PyAsn1Error('No value for %s()' % attr)\r\npyasn1.error.PyAsn1Error: No value for decode()\r\n```\r\n\r\n#### Update:\r\n`Not().getTagMap` is inherited from `Choice` and runs `Set.getComponentTagMap(self)` (due to empty `Not()._tagSet`):\r\n```py\r\n    def getComponentTagMap(self):\r\n        if self._componentType:\r\n            return self._componentType.getTagMap(True)\r\n```\r\nwhere `Not()._componentType` is empty so it returns `None` and fails later in various places."},"comment":{"url":"https://api.github.com/repos/cannatag/ldap3/issues/comments/260045803","html_url":"https://github.com/cannatag/ldap3/issues/255#issuecomment-260045803","issue_url":"https://api.github.com/repos/cannatag/ldap3/issues/255","id":260045803,"user":{"login":"andreif","id":259691,"avatar_url":"https://avatars.githubusercontent.com/u/259691?v=3","gravatar_id":"","url":"https://api.github.com/users/andreif","html_url":"https://github.com/andreif","followers_url":"https://api.github.com/users/andreif/followers","following_url":"https://api.github.com/users/andreif/following{/other_user}","gists_url":"https://api.github.com/users/andreif/gists{/gist_id}","starred_url":"https://api.github.com/users/andreif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreif/subscriptions","organizations_url":"https://api.github.com/users/andreif/orgs","repos_url":"https://api.github.com/users/andreif/repos","events_url":"https://api.github.com/users/andreif/events{/privacy}","received_events_url":"https://api.github.com/users/andreif/received_events","type":"User","site_admin":false},"created_at":"2016-11-11T20:15:24Z","updated_at":"2016-11-11T20:15:24Z","body":"@cannatag I am testing [devise_ldap_authenticatable](https://github.com/cschiewek/devise_ldap_authenticatable) for Ruby-on-Rails using a `ldap3`-based server. The Rails app sends the first bind message, on which I respond with success. Then I get the second message which I try to `decode(message, asn1Spec=LDAPMessage())` and get the error. The second message is:\r\n```py\r\nb'0\\x81\\xaa\\x02\\x01\\x02c\\x81\\xa4\\x04\\x00\\n\\x01\\x00\\n\\x01\\x00\\x02\\x01\\x00\\x02\\x01\\x00\\x01\\x01\\x00\\x87\\x0bobjectclass0\\x81\\x83\\x04\\x0enamingContexts\\x04\\x14supportedLdapVersion\\x04\\taltServer\\x04\\x10supportedControl\\x04\\x12supportedExtension\\x04\\x11supportedFeatures\\x04\\x17supportedSASLMechanisms'\r\n```\r\nDisclaimer: I am very new to LDAP and likely doing it wrong."}}
{"actor":{"display_login":"andreif"}}