labelle-org / labelle

Label printing software
Apache License 2.0
23 stars 3 forks source link

Issues building PyQt6 #40

Open cr3ation opened 2 months ago

cr3ation commented 2 months ago

Failing to build labelle due to error thrown when building PyQt6.

Scenario 1

Hardware: Raspberry Pi 3B+ OS: Raspberry Pi OS 12 (based on Bookworm) Python versions tested: 3.9, 3.10, 3.11, 3.12 Installation method 1: pipex install labelle

Error trown:

pi@dymo:~/Documents $ pipx install labelle
Fatal error from pip prevented installation. Full pip output in file:
    /home/pi/.local/pipx/logs/cmd_2024-05-01_20.33.15_pip_errors.log

pip seemed to fail to build package:
    pyqt6

Some possibly relevant errors from pip install:
    error: subprocess-exited-with-error
    error: metadata-generation-failed

Error installing labelle.
pi@dymo:~/Documents $ cat /home/pi/.local/pipx/logs/cmd_2024-05-01_20.33.15_pip_errors.log
PIP STDOUT
----------
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting labelle
  Using cached https://www.piwheels.org/simple/labelle/labelle-1.2.1-py3-none-any.whl (1.3 MB)
Collecting darkdetect (from labelle)
  Using cached https://www.piwheels.org/simple/darkdetect/darkdetect-0.8.0-py3-none-any.whl (9.0 kB)
Collecting pillow<11,>=8.1.2 (from labelle)
  Using cached pillow-10.3.0-cp311-cp311-manylinux_2_28_aarch64.whl.metadata (9.2 kB)
Collecting platformdirs (from labelle)
  Using cached https://www.piwheels.org/simple/platformdirs/platformdirs-4.2.1-py3-none-any.whl (17 kB)
Collecting pyqrcode<2,>=1.2.1 (from labelle)
  Using cached https://www.piwheels.org/simple/pyqrcode/PyQRCode-1.2.1-py3-none-any.whl (36 kB)
Collecting pyqt6 (from labelle)
  Using cached PyQt6-6.7.0.tar.gz (1.1 MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'error'

PIP STDERR
----------
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [25 lines of output]
      Traceback (most recent call last):
        File "/home/pi/.local/pipx/shared/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/pi/.local/pipx/shared/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/pi/.local/pipx/shared/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel
          whl_basename = backend.build_wheel(metadata_directory, config_settings)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-3489j0ck/overlay/lib/python3.11/site-packages/sipbuild/api.py", line 46, in build_wheel
          project = AbstractProject.bootstrap('wheel',
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-3489j0ck/overlay/lib/python3.11/site-packages/sipbuild/abstract_project.py", line 92, in bootstrap
          project.setup(pyproject, tool, tool_description)
        File "/tmp/pip-build-env-3489j0ck/overlay/lib/python3.11/site-packages/sipbuild/project.py", line 587, in setup
          self.apply_user_defaults(tool)
        File "/tmp/pip-install-g7cy8yug/pyqt6_b43269425270408fad2e10e76d5f71f4/project.py", line 66, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "/tmp/pip-build-env-3489j0ck/overlay/lib/python3.11/site-packages/pyqtbuild/project.py", line 51, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "/tmp/pip-build-env-3489j0ck/overlay/lib/python3.11/site-packages/sipbuild/project.py", line 237, in apply_user_defaults
          self.builder.apply_user_defaults(tool)
        File "/tmp/pip-build-env-3489j0ck/overlay/lib/python3.11/site-packages/pyqtbuild/builder.py", line 50, in apply_user_defaults
          raise PyProjectOptionException('qmake',
      sipbuild.pyproject.PyProjectOptionException
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Installation method 2:

git clone https://github.com/labelle-org/labelle.git
cd labelle
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install --editable .

Error trown

(venv) pi@dymo:~/labelle $ pip install --editable .
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Obtaining file:///home/pi/labelle
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Installing backend dependencies ... done
  Preparing editable metadata (pyproject.toml) ... done
Collecting darkdetect
  Downloading https://www.piwheels.org/simple/darkdetect/darkdetect-0.8.0-py3-none-any.whl (9.0 kB)
Collecting pillow<11,>=8.1.2
  Downloading pillow-10.3.0-cp311-cp311-manylinux_2_28_aarch64.whl (4.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.3/4.3 MB 6.5 MB/s eta 0:00:00
Collecting platformdirs
  Downloading https://www.piwheels.org/simple/platformdirs/platformdirs-4.2.1-py3-none-any.whl (17 kB)
Collecting pyqrcode<2,>=1.2.1
  Downloading https://www.piwheels.org/simple/pyqrcode/PyQRCode-1.2.1-py3-none-any.whl (36 kB)
Collecting pyqt6
  Downloading PyQt6-6.7.0.tar.gz (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 6.8 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [25 lines of output]
      Traceback (most recent call last):
        File "/home/pi/labelle/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/pi/labelle/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/pi/labelle/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel
          whl_basename = backend.build_wheel(metadata_directory, config_settings)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-k9v2b7s_/overlay/lib/python3.11/site-packages/sipbuild/api.py", line 46, in build_wheel
          project = AbstractProject.bootstrap('wheel',
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-k9v2b7s_/overlay/lib/python3.11/site-packages/sipbuild/abstract_project.py", line 92, in bootstrap
          project.setup(pyproject, tool, tool_description)
        File "/tmp/pip-build-env-k9v2b7s_/overlay/lib/python3.11/site-packages/sipbuild/project.py", line 587, in setup
          self.apply_user_defaults(tool)
        File "/tmp/pip-install-z2h7um8x/pyqt6_3bf9569226364d7bb157c2c4ae30cc76/project.py", line 66, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "/tmp/pip-build-env-k9v2b7s_/overlay/lib/python3.11/site-packages/pyqtbuild/project.py", line 51, in apply_user_defaults
          super().apply_user_defaults(tool)
        File "/tmp/pip-build-env-k9v2b7s_/overlay/lib/python3.11/site-packages/sipbuild/project.py", line 237, in apply_user_defaults
          self.builder.apply_user_defaults(tool)
        File "/tmp/pip-build-env-k9v2b7s_/overlay/lib/python3.11/site-packages/pyqtbuild/builder.py", line 50, in apply_user_defaults
          raise PyProjectOptionException('qmake',
      sipbuild.pyproject.PyProjectOptionException
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Scenario 2

Hardware: MacBook Pro 16" M2 OS: macOS Sonoma 14.4 (23E214) Python versions tested: 3.9, 3.12

Same methods as above. Same errors.

Scenario 3

Hardware: Raspberry Pi 3B+ OS: Raspberry Pi OS 12 (based on Bookworm) Docker: Version 26.1.0, build 9714adc Image: Official Python images 3.8, 3.9, 3.10 and 3.12 – all failed.

Same methods as above. Same errors.

I need help finding out what I can do to solve this issue. Please help. 🙏

tomers commented 2 months ago

Hello Henrik,

Thank you for reporting this issue. I suspect it is not a labelle specific issue.

Could you please try to execute the following command?

pip install pyqt6

In case you experience errors installing this package, then please open an issue in https://www.riverbankcomputing.com/support/pyqt

Regards, Tomer

On Wed, May 1, 2024 at 10:34 PM Henrik Engström @.***> wrote:

Failing to build labelle due to error thrown when building PyQt6. Scenario 1

Hardware: Raspberry Pi 3B+ OS: Raspberry Pi OS 12 (based on Bookworm) Python versions tested: 3.9, 3.10, 3.11, 3.12 Installation method 1: pipex install labelle

Error trown:

@.***:~/Documents $ pipx install labelle Fatal error from pip prevented installation. Full pip output in file: /home/pi/.local/pipx/logs/cmd_2024-05-01_20.33.15_pip_errors.log

pip seemed to fail to build package: pyqt6

Some possibly relevant errors from pip install: error: subprocess-exited-with-error error: metadata-generation-failed

Error installing labelle. @.***:~/Documents $ cat /home/pi/.local/pipx/logs/cmd_2024-05-01_20.33.15_pip_errors.log PIP STDOUT

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting labelle Using cached https://www.piwheels.org/simple/labelle/labelle-1.2.1-py3-none-any.whl (1.3 MB) Collecting darkdetect (from labelle) Using cached https://www.piwheels.org/simple/darkdetect/darkdetect-0.8.0-py3-none-any.whl (9.0 kB) Collecting pillow<11,>=8.1.2 (from labelle) Using cached pillow-10.3.0-cp311-cp311-manylinux_2_28_aarch64.whl.metadata (9.2 kB) Collecting platformdirs (from labelle) Using cached https://www.piwheels.org/simple/platformdirs/platformdirs-4.2.1-py3-none-any.whl (17 kB) Collecting pyqrcode<2,>=1.2.1 (from labelle) Using cached https://www.piwheels.org/simple/pyqrcode/PyQRCode-1.2.1-py3-none-any.whl (36 kB) Collecting pyqt6 (from labelle) Using cached PyQt6-6.7.0.tar.gz (1.1 MB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'error'

PIP STDERR

error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [25 lines of output] Traceback (most recent call last): File "/home/pi/.local/pipx/shared/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/home/pi/.local/pipx/shared/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/pi/.local/pipx/shared/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel whl_basename = backend.build_wheel(metadata_directory, config_settings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-3489j0ck/overlay/lib/python3.11/site-packages/sipbuild/api.py", line 46, in build_wheel project = AbstractProject.bootstrap('wheel', ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-3489j0ck/overlay/lib/python3.11/site-packages/sipbuild/abstract_project.py", line 92, in bootstrap project.setup(pyproject, tool, tool_description) File "/tmp/pip-build-env-3489j0ck/overlay/lib/python3.11/site-packages/sipbuild/project.py", line 587, in setup self.apply_user_defaults(tool) File "/tmp/pip-install-g7cy8yug/pyqt6_b43269425270408fad2e10e76d5f71f4/project.py", line 66, in apply_user_defaults super().apply_user_defaults(tool) File "/tmp/pip-build-env-3489j0ck/overlay/lib/python3.11/site-packages/pyqtbuild/project.py", line 51, in apply_user_defaults super().apply_user_defaults(tool) File "/tmp/pip-build-env-3489j0ck/overlay/lib/python3.11/site-packages/sipbuild/project.py", line 237, in apply_user_defaults self.builder.apply_user_defaults(tool) File "/tmp/pip-build-env-3489j0ck/overlay/lib/python3.11/site-packages/pyqtbuild/builder.py", line 50, in apply_user_defaults raise PyProjectOptionException('qmake', sipbuild.pyproject.PyProjectOptionException [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

Installation method 2:

git clone https://github.com/labelle-org/labelle.git cd labelle python3 -m venv venv source venv/bin/activate pip install --upgrade pip pip install --editable .

Error trown

(venv) @.***:~/labelle $ pip install --editable . Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Obtaining file:///home/pi/labelle Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build editable ... done Installing backend dependencies ... done Preparing editable metadata (pyproject.toml) ... done Collecting darkdetect Downloading https://www.piwheels.org/simple/darkdetect/darkdetect-0.8.0-py3-none-any.whl (9.0 kB) Collecting pillow<11,>=8.1.2 Downloading pillow-10.3.0-cp311-cp311-manylinux_2_28_aarch64.whl (4.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.3/4.3 MB 6.5 MB/s eta 0:00:00 Collecting platformdirs Downloading https://www.piwheels.org/simple/platformdirs/platformdirs-4.2.1-py3-none-any.whl (17 kB) Collecting pyqrcode<2,>=1.2.1 Downloading https://www.piwheels.org/simple/pyqrcode/PyQRCode-1.2.1-py3-none-any.whl (36 kB) Collecting pyqt6 Downloading PyQt6-6.7.0.tar.gz (1.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 6.8 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [25 lines of output] Traceback (most recent call last): File "/home/pi/labelle/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/home/pi/labelle/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/pi/labelle/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel whl_basename = backend.build_wheel(metadata_directory, configsettings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-k9v2b7s/overlay/lib/python3.11/site-packages/sipbuild/api.py", line 46, in buildwheel project = AbstractProject.bootstrap('wheel', ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-k9v2b7s/overlay/lib/python3.11/site-packages/sipbuild/abstract_project.py", line 92, in bootstrap project.setup(pyproject, tool, tooldescription) File "/tmp/pip-build-env-k9v2b7s/overlay/lib/python3.11/site-packages/sipbuild/project.py", line 587, in setup self.apply_user_defaults(tool) File "/tmp/pip-install-z2h7um8x/pyqt6_3bf9569226364d7bb157c2c4ae30cc76/project.py", line 66, in apply_user_defaults super().apply_userdefaults(tool) File "/tmp/pip-build-env-k9v2b7s/overlay/lib/python3.11/site-packages/pyqtbuild/project.py", line 51, in apply_user_defaults super().apply_userdefaults(tool) File "/tmp/pip-build-env-k9v2b7s/overlay/lib/python3.11/site-packages/sipbuild/project.py", line 237, in apply_user_defaults self.builder.apply_userdefaults(tool) File "/tmp/pip-build-env-k9v2b7s/overlay/lib/python3.11/site-packages/pyqtbuild/builder.py", line 50, in apply_user_defaults raise PyProjectOptionException('qmake', sipbuild.pyproject.PyProjectOptionException [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

Scenario 2

Hardware: MacBook Pro 16" M2 OS: macOS Sonoma 14.4 (23E214) Python versions tested: 3.9, 3.12

Same methods as above. Same errors. Scenario 3

Hardware: Raspberry Pi 3B+ OS: Raspberry Pi OS 12 (based on Bookworm) Docker: Version 26.1.0, build 9714adc Image: Official Python images https://hub.docker.com/_/python 3.8, 3.9, 3.10 and 3.12 – all failed.

Same methods as above. Same errors.

I need help finding out what I can do to solve this issue. Please help. 🙏

— Reply to this email directly, view it on GitHub https://github.com/labelle-org/labelle/issues/40, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAUL475H3MYJFGE6NTJLG3ZAE7VTAVCNFSM6AAAAABHCONUKKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI3TIMBWHE4TMMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

cr3ation commented 2 months ago

Hello Tomer,

Thank you for your extremely rapid response! I'll will do some tests tomorrow and post an update. I'll get back to you!

Regards, Henrik

cr3ation commented 2 months ago

Good morning Tomer,

Running pip install pyqt6 throws the same error.

Did I understand correctly that I have to join the mail group in order to raise an issue regarding pyqt?

Regards, Henrik

cr3ation commented 2 months ago

Hardware: Raspberry Pi 3B+ OS: Ubuntu Server 24.04 LTS (64-bit) Detailed OS info: Linux dymo 6.8.0-1004-raspi #4-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 02:29:55 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux Python: 3.12.3

pip install pyqt6 throws same error.

tomers commented 2 months ago

Hey Henrik,

Did I understand correctly that I have to join the mail group in order to raise an issue regarding pyqt? Yes, it seems that this is the way to get them to help you with your issue.

This is an indication that it is clearly not a fault in the Labelle code base. Labelle uses PyQT6 as a 3rd party software module. It is a software library which lets you develop applications with intuitive user interfaces for multiple devices and platforms, and it is used by the Labelle app, thus it is being installed as part of the installation process. Since the error you experience happens during the installation of that library, then the issue is clearly with that library's code, and not with anything specific to labelle. I wish I could have helped you with this, but I am not proficient enough with PyQT6's installation process. I suggest you go to their homepage at https://www.riverbankcomputing.com/software/pyqt/ and seek help from the developers of that library. They have an extensive Asking For Help page here: https://www.riverbankcomputing.com/support/pyqt.

HTH, Tomer

On Thu, May 2, 2024 at 10:40 AM Henrik Engström @.***> wrote:

Good morning Tomer,

Running pip install pyqt6 throws the same error.

Did I understand correctly that I have to join the mail group in order to raise an issue regarding pyqt?

Regards, Henrik

— Reply to this email directly, view it on GitHub https://github.com/labelle-org/labelle/issues/40#issuecomment-2089813468, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAUL43OOFZHNOU6XHQXTU3ZAHUVDAVCNFSM6AAAAABHCONUKKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBZHAYTGNBWHA . You are receiving this because you commented.Message ID: @.***>

maresb commented 2 months ago

@cr3ation, are you primarily interested in Labelle CLI or GUI? In case you only need the CLI, then in principle pyqt is not needed. In that case a workaround would be to manually install the dependencies, so something along the lines of

pip install --no-deps labelle
pip install platformdirs "Pillow>=8.1.2,<11" "PyQRCode>=1.2.1,<2" "python-barcode>=0.13.1,<1" "pyusb" "darkdetect" "typer"

And ideally the above should be done in a virtual environment so that you're not polluting your global environment.

(We might consider in the future separating the CLI and GUI so that pyqt is no longer formally a required dependency for the CLI, but this would first require some discussion, and there's no timeline.)

cr3ation commented 2 months ago

@maresb, thank you! I'm only interested in Labelle CLI. No need for Labelle GUI.

The following works for building only the CLI!

pip install --no-deps labelle
pip install platformdirs "Pillow>=8.1.2,<11" "PyQRCode>=1.2.1,<2" "python-barcode>=0.13.1,<1" "pyusb" "darkdetect" "typer"

If possible, I think it might be a good thing to have the CLI and GUI separated in order to not end up in similar issues in the future.

Feel free to have a look at my small project dymo-webprint. A Flask web service used to print labels using POST request.

@tomers, I'll make sure to post a notification to inform riverbankin about the build issues related to PyQT6.

You decide if you want to consider this issue resolved or not. I'm happy – however the app can still not be built as intended.

Thank's for all your friendly help!

tomers commented 2 months ago

@cr3ation great to hear :-) I'm quite surprised by your project! I did not look into it yet, but the idea is exactly what we had in mind for our roadmap. It would be great if you could wrap it in a docker image and publich it to https://hub.docker.com/ or any other docker registry. I guess we could mention your project in our documentation and/or examples (feel free to submit PR for that...)

cr3ation commented 2 months ago

Thank's for your kind words. It's a really simple web app that only support basic functionality.

I have uploaded a docker image to docker hub.

You can run it by using

docker run -d --privileged -v /dev/bus/usb:/dev/bus/usb -p 5001:5001 creation/dymo-webprint:latest`

Below are some usage examples. Please keep in mind; this only has some core functionality for basic printing. I have not created any API-support for advanced customisation of prints.

Print using POST request:

curl --header "Content-Type: application/json" \
  --request POST \
  --data '{"text1": "First row", "text2": "Second row", "qr": "https://tiny-url.com"}' \
  http://localhost:5001/print

Supported parameters. One of either text1, qr or img_url is mandatory, rest is optional.

{
    "text1": "First row",
    "text2": "Second row",
    "text3": "Third row",
    "text4": "Forth row",
    "img_url": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png",
    "qr": "https://tiny-url.com"
}