how to solve "Unresolved reference 'unpack'" in python3.7?
Question:
when I check the code in kaggle 3hr-tensorrt-nextvit-example, I find there is a error that I can not solve. it is called Unresolved reference ‘unpack‘.what should I do?
unc_data = unpack(unpack_fmt, cast(bytes, item.LUTData))
Answers:
import the symbol
unpack
is probably a symbol you need to import in your file.
If you don’t import it or define yourself a function named unpack
, python will tell you with this error. Can you put this on top of your file?
from struct import unpack
The way unpack
is called looks like this function is the one from the built-in library.
when I check the code in kaggle 3hr-tensorrt-nextvit-example, I find there is a error that I can not solve. it is called Unresolved reference ‘unpack‘.what should I do?
unc_data = unpack(unpack_fmt, cast(bytes, item.LUTData))
import the symbol
unpack
is probably a symbol you need to import in your file.
If you don’t import it or define yourself a function named unpack
, python will tell you with this error. Can you put this on top of your file?
from struct import unpack
The way unpack
is called looks like this function is the one from the built-in library.