0

when I simply use this single line of code:

import dpkt

I get this error:

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    import dpkt
  File "C:\Python27\lib\dpkt\__init__.py", line 24, in <module>
    import ethernet
  File "C:\Python27\lib\dpkt\ethernet.py", line 128, in <module>
    __load_types()
  File "C:\Python27\lib\dpkt\ethernet.py", line 122, in __load_types
    mod = __import__(modname, g)
  File "C:\Python27\lib\dpkt\ip6.py", line 101, in <module>
    import ip
  File "C:\Python27\lib\dpkt\ip.py", line 258, in <module>
    __load_protos()
  File "C:\Python27\lib\dpkt\ip.py", line 255, in __load_protos
    IP.set_proto(v, getattr(mod, name.upper()))
AttributeError: 'module' object has no attribute 'VISA'

What could be the problem?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131

1 Answers1

0

The dpkt issue page has a patch for this problem. The second patch at https://code.google.com/p/dpkt/issues/detail?id=34 fixes the import issue.

Ken Shirriff
  • 1,654
  • 16
  • 20