Discuss / Python / 我使用import以后,struct和base64会报错啊

我使用import以后,struct和base64会报错啊

Topic source

只爱伊荻

#1 Created at ... [Delete] [Delete and Lock User]

C:\Users\dahai>python G:\struct.py Traceback (most recent call last): File "G:\struct.py", line 4, in <module> import struct File "G:\struct.py", line 8, in <module> print(struct.unpack('<ccIIIIIIHH', bmp_header)) AttributeError: 'module' object has no attribute 'unpack' 为什么我用notepad++编,函数会这样报错啊,在import base64的时候也不行,老是报错啊

廖雪峰

#2 Created at ... [Delete] [Delete and Lock User]

自己的py文件不要和系统的重名


  • 1

Reply