{"action":"opened","issue":{"url":"https://api.github.com/repos/mike01/pypacker/issues/49","repository_url":"https://api.github.com/repos/mike01/pypacker","labels_url":"https://api.github.com/repos/mike01/pypacker/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/mike01/pypacker/issues/49/comments","events_url":"https://api.github.com/repos/mike01/pypacker/issues/49/events","html_url":"https://github.com/mike01/pypacker/issues/49","id":341441793,"node_id":"MDU6SXNzdWUzNDE0NDE3OTM=","number":49,"title":"IPv4 Packet Creation failed : TypeError: object of type 'NoneType' has no len()","user":{"login":"sunilkr","id":407194,"node_id":"MDQ6VXNlcjQwNzE5NA==","avatar_url":"https://avatars0.githubusercontent.com/u/407194?v=4","gravatar_id":"","url":"https://api.github.com/users/sunilkr","html_url":"https://github.com/sunilkr","followers_url":"https://api.github.com/users/sunilkr/followers","following_url":"https://api.github.com/users/sunilkr/following{/other_user}","gists_url":"https://api.github.com/users/sunilkr/gists{/gist_id}","starred_url":"https://api.github.com/users/sunilkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunilkr/subscriptions","organizations_url":"https://api.github.com/users/sunilkr/orgs","repos_url":"https://api.github.com/users/sunilkr/repos","events_url":"https://api.github.com/users/sunilkr/events{/privacy}","received_events_url":"https://api.github.com/users/sunilkr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-16T09:13:07Z","updated_at":"2018-07-16T09:13:07Z","closed_at":null,"author_association":"NONE","body":"While crafting IPv4 packet, following exception was raise.\r\nCode:\r\n```python\r\n        pkt = ip.IP(src_s='127.0.0.1', dst_s='127.0.0.2', tos=0, id=12, off=1024, ttl=64)\r\n        pkt.flags = ip.IP_DF|ip.IP_MF\r\n        pkt.body_bytes = b'12345678'\r\n        raw = pkt.bin()\r\n```\r\n\r\nTraceBack:\r\n\r\n```python\r\nTraceback (most recent call last):\r\n  File \"/home/user/code/py3/project/unittests/test_ip.py\", line 57, in test_match_unicast_true\r\n    raw = pkt.bin()\r\n  File \"/home/user/.local/lib/python3.6/site-packages/pypacker/pypacker.py\", line 820, in bin\r\n    layer._update_fields()\r\n  File \"/home/user/.local/lib/python3.6/site-packages/pypacker/layer3/ip.py\", line 229, in _update_fields\r\n    self.sum = in_cksum(self._pack_header())\r\n  File \"/home/user/.local/lib/python3.6/site-packages/pypacker/checksum.py\", line 49, in in_cksum\r\n    return in_cksum_done(in_cksum_add(0, buf))\r\n  File \"/home/user/.local/lib/python3.6/site-packages/pypacker/checksum.py\", line 23, in in_cksum_add\r\n    n = len(buf)\r\nTypeError: object of type 'NoneType' has no len()\r\n```\r\n\r\nSomething I did wrong, or its some corner case. Hoe to access error object from pypacker.PyPacket \r\n\r\n"}}
{"actor":{"display_login":"sunilkr"}}