Skip to content

ImportError: cannot import name 'DeviceNotFoundError' from 'escpos.exceptions' #629

Description

@Torreblanca

Hi. with 'from escpos.printer import Usb' I get the next error ever ...

I have:

  • [x ] searched open and closed issues for duplicates

Bug description

Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Users\Usuario\AppData\Local\Programs\Python\Python311\Scripts\python-escpos.exe_main
.py", line 4, in
File "C:\Users\Usuario\AppData\Local\Programs\Python\Python311\Lib\site-packages\escpos\cli.py", line 21, in
from . import config
File "C:\Users\Usuario\AppData\Local\Programs\Python\Python311\Lib\site-packages\escpos\config.py", line 12, in
from . import printer
File "C:\Users\Usuario\AppData\Local\Programs\Python\Python311\Lib\site-packages\escpos\printer_init
.py", line 4, in
from .cups import CupsPrinter
File "C:\Users\Usuario\AppData\Local\Programs\Python\Python311\Lib\site-packages\escpos\printer\cups.py", line 17, in
from ..exceptions import DeviceNotFoundError
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'DeviceNotFoundError' from 'escpos.exceptions' (C:\Users\Usuario\AppData\Local\Programs\Python\Python311\Lib\site-packages\escpos\exceptions.py)

Steps to reproduce

  • from escpos.printer import Usb

Device info

Printer: Manufacturer Model XVI

python-escpos version: --pre

python version: 03.11 x64

operating system: Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions