Probesys / lotemplate

LOTemplate is document generator used to create documents programatically (ODT, DOCX, PDF) from a template (DOCX or ODT) and a json file.
GNU Affero General Public License v3.0
23 stars 1 forks source link

[BUG] ModuleNotFoundError: No module named 'uno' #18

Closed setop closed 1 year ago

setop commented 1 year ago

Describe the bug

ModuleNotFoundError: No module named 'uno'

To Reproduce

  1. git clone
  2. pip install -r requirements.txt
  3. python lotemplate_cli.py

Expected behavior

program to run

Actual behavior

ModuleNotFoundError: No module named 'uno'

System information

Debian

Version

11.6

Additional context

after manually pip install uno, I get ModuleNotFoundError: No module named 'base'

cyrilus commented 1 year ago

Yes indeed, the doc doesn't specify the dependency set for a non-docker install. We need to think about completing this.

dependencies can be found in the Dockerfile

I recommend installing the backport version of LibreOffice you should do this before pip install

echo 'deb http://deb.debian.org/debian bullseye-backports main' > /etc/apt/sources.list.d/backports.list
apt update
apt -y -t bullseye-backports install bash python3 python3-uno python3-pip libreoffice-nogui

tell me if this solves the problem

setop commented 1 year ago

Hi

Thanks for the quick reply.

sudo apt-get -t bullseye-backports install bash python3 python3-uno python3-pip libreoffice-nogui
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
bash is already the newest version (5.1-2+deb11u1).
python3 is already the newest version (3.9.2-3).
python3 set to manually installed.
The following packages were automatically installed and are no longer required:
  libcmis-0.5-5v5 libjuh-java libjurt-java libmwaw-0.3-3 libnumbertext-1.0-0 libnumbertext-data liborcus-0.16-0 liborcus-parser-0.16-0 libridl-java
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  firebird3.0-common firebird3.0-common-doc firebird3.0-server-core firebird3.0-utils fonts-opensymbol libabsl20200923 libbox2d2.3.0 libbsh-java libfbclient2 libhsqldb1.8.0-java libib-util libjs-jquery
  libjs-sphinxdoc libjs-underscore libmariadb3 libpython3-dev libpython3.9-dev libreoffice-base-core libreoffice-base-drivers libreoffice-base-nogui libreoffice-calc-nogui libreoffice-common
  libreoffice-core-nogui libreoffice-draw-nogui libreoffice-impress-nogui libreoffice-java-common libreoffice-math-nogui libreoffice-report-builder-bin-nogui libreoffice-script-provider-bsh
  libreoffice-script-provider-js libreoffice-script-provider-python libreoffice-sdbc-firebird libreoffice-sdbc-hsqldb libreoffice-sdbc-mysql libreoffice-writer-nogui libtommath1 libuno-cppuhelpergcc3-3
  libuno-sal3 mariadb-common mysql-common python-pip-whl python3-dev python3-distutils python3-lib2to3 python3-pkg-resources python3-setuptools python3-wheel python3.9-dev uno-libs-private ure ure-java
Suggested packages:
  firebird3.0-server firebird3.0-doc java-virtual-machine libhsqldb1.8.0-java-gcj libreoffice-base libjtds-java libreoffice-sdbc-postgresql | odbc-postgresql | libpg-java libsqliteodbc | tdsodbc
  | odbc-mdbtools libreoffice-report-builder unixodbc gpa imagemagick | graphicsmagick-imagemagick-compat libreoffice-grammarcheck myspell-dictionary pstoedit default-mysql-server | virtual-mysql-server
  fonts-crosextra-caladea fonts-crosextra-carlito python-setuptools-doc
Recommended packages:
  libreoffice-writer libreoffice-sdbc-postgresql
The following packages will be REMOVED:
  gnome libreoffice-calc libreoffice-core libreoffice-draw libreoffice-gnome libreoffice-gtk3 libreoffice-impress libreoffice-math libreoffice-writer
The following NEW packages will be installed:
  firebird3.0-common firebird3.0-common-doc firebird3.0-server-core firebird3.0-utils libabsl20200923 libbox2d2.3.0 libbsh-java libfbclient2 libhsqldb1.8.0-java libib-util libjs-jquery libjs-sphinxdoc
  libjs-underscore libmariadb3 libpython3-dev libpython3.9-dev libreoffice-base-drivers libreoffice-base-nogui libreoffice-calc-nogui libreoffice-core-nogui libreoffice-draw-nogui libreoffice-impress-nogui
  libreoffice-java-common libreoffice-math-nogui libreoffice-nogui libreoffice-report-builder-bin-nogui libreoffice-script-provider-bsh libreoffice-script-provider-js libreoffice-script-provider-python
  libreoffice-sdbc-firebird libreoffice-sdbc-hsqldb libreoffice-sdbc-mysql libreoffice-writer-nogui libtommath1 mariadb-common mysql-common python-pip-whl python3-dev python3-distutils python3-lib2to3
  python3-pip python3-setuptools python3-wheel python3.9-dev ure-java
The following packages will be upgraded:
  fonts-opensymbol libreoffice-base-core libreoffice-common libuno-cppuhelpergcc3-3 libuno-sal3 python3-pkg-resources python3-uno uno-libs-private ure
9 upgraded, 45 newly installed, 9 to remove and 220 not upgraded.
Need to get 104 MB of archives.
After this operation, 37.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] ^C

This is too much of change for my machine ; I fear for instability. I'll probably try in a VM of with Docker.

philippe-levan commented 1 year ago

Will be fixed by documentation change in https://github.com/Probesys/lotemplate/pull/19

probably merged in v1.2.0 next week

cyrilus commented 1 year ago

fix by #19