Traceback (most recent call last):
File "C:\Users\pured\OneDrive\Área de Trabalho\impressao_zpl\impressao_zpl.py", line 6, in <module>
from zpl2 import ZPLDocument, ZPLLabel
ImportError: cannot import name 'ZPLDocument' from 'zpl2' (C:\Users\pured\AppData\Local\Programs\Python\Python311\Lib\site-packages\zpl2.py)
I attempted to implement a Python script for printing ZPL labels using the zpl2 library. I expected the script to successfully import the necessary modules, read ZPL files, and send them to a printer using the qz-tray tool. However, upon execution, I encountered import errors related to the ZPLDocument class from the zpl2 library, preventing the script from functioning as intended. I have been troubleshooting the issue by verifying library versions, checking for potential conflicts, and exploring code adjustments. My goal is to resolve these import errors and achieve successful ZPL label printing using the script.