Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odoo Install packages not being found by TKLDEV #2015

Open
l-arnold opened this issue Jan 2, 2025 · 2 comments
Open

Odoo Install packages not being found by TKLDEV #2015

l-arnold opened this issue Jan 2, 2025 · 2 comments

Comments

@l-arnold
Copy link

l-arnold commented Jan 2, 2025

I've been trying to do a few Odoo TKLDEV builds.
Basically odoo-16 is not a Debian or bullseye-backport package anymore.

odoo-14 is one and it is findable from the command line of tkldev.

I am using the

turnkeylinux-apps/odoo

source and have done some branch tests in my own repository
however, tkldev -> make will not find even odoo-14 if it is called from Makefile and plan/main

Have tried it everywhich way. It seems that apt-get update needs to be run within the tkldev/make process but not sure.

Really wanting to make a stepped set of builds odoo14, Odoo15, Odoo 16 etc so that proper upgrades with OpenUPGRADE can be done. The only debian packages I can find just now are odoo-14 and odoo-18.

Any thoughts on how to fix this?

@l-arnold
Copy link
Author

l-arnold commented Jan 3, 2025

It looks like I am building odoo-14 now with TKLdev 18.1
I changed the call for odoo-16 to odoo-14 in my branch

then I added with fab-chroot
sources.list.d/backports.list

deb http://deb.debian.org/debian bullseye-backports main contrib non-free

preferences.d/backports.pref

Package: odoo-14
Pin: release a=bullseye-backports
Pin-Priority: 900

I had the same files in my Build Set for Odoo-14 (using my Odoo-16 Branch) but it would not find the Odoo package nor proceed with all the python stuff.

(was putting everything together and I get an error during Odoo-Startup:
Guessing I have a running system here that may have Hung before building an ISO, but not sure.

To activate the new configuration, you need to run:
systemctl reload apache2

  • a2ensite odoo.conf
    Enabling site odoo.
    To activate the new configuration, you need to run:
    systemctl reload apache2
  • systemctl start postgresql
    service tkldev service wrapper falling back to /usr/sbin/service
    Starting PostgreSQL 15 database server: main.
  • systemctl start apache2
  • su odoo -g odoo -s /bin/bash -c 'odoo -i base
    --stop-after-init --db_host=localhost
    -d "TurnkeylinuxExample"
    -r "odoo"
    -w "38a33a9bee1c903d99aa34ff37b3b07f"
    -s -c "/etc/odoo/odoo.conf"'
    Traceback (most recent call last):
    File "/bin/odoo", line 5, in
    import odoo
    File "/usr/lib/python3/dist-packages/odoo/init.py", line 113, in
    from . import modules
    File "/usr/lib/python3/dist-packages/odoo/modules/init.py", line 8, in
    from . import db, graph, loading, migration, module, registry
    File "/usr/lib/python3/dist-packages/odoo/modules/graph.py", line 10, in
    import odoo.tools as tools
    File "/usr/lib/python3/dist-packages/odoo/tools/init.py", line 9, in
    from . import pdf
    File "/usr/lib/python3/dist-packages/odoo/tools/pdf.py", line 5, in
    from PyPDF2.utils import b_
    ModuleNotFoundError: No module named 'PyPDF2.utils'
    make: *** [/usr/share/fab/product.mk:577: build/stamps/root.patched] Error 1

@l-arnold
Copy link
Author

l-arnold commented Jan 3, 2025

Various issues going on here. It seems Odoo needs:
One answer says:

"Use PyPDF2 1.28.6 or older. Odoo is not compatible with PyPDF2 2.x"

Though below that:

"I installed odoo a week ago and have faced the same problem. After checking a number of forums with a number of suggestions, installing and uninstalling Python programs, and a lot of other things, I checked the installation path. I found out that there is a "_utils.py" file, but no "utils.py", so I made a copy of the first one and named it as the second one. Voilá.

Share
Improve this answer
Follow
answered Feb 22, 2023 at 21:31
Paraguay Errante's user avatar
Paraguay Errante
2111 bronze badge
This solution is referring to python3-pypdf2 package, not Odoo. To find the path, you can run dpkg -L python3-pypdf2 | grep -i _utils.py I found 2 paths, and made symlinks pointing to the _utils.py file sudo ln -sf _utils.py utils.py and it solved the issue –
StR
CommentedJan 5, 2024 at 16:10

So, Perhaps some "sed" rename in the Build would work for this. I will look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant