How to Solve NameError: name 'OffsetRequest' is not defined -- kafka
Solution: Import the 'OffsetRequest' module
To Solve the error, add the following line to the top of your code.
from kafka import OffsetRequest
For more information:
Python kafka OffsetRequest