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

base_vat_optional_vies: vatnumber installation #1699

Closed
1 task
SirTakobi opened this issue Jul 18, 2023 · 3 comments
Closed
1 task

base_vat_optional_vies: vatnumber installation #1699

SirTakobi opened this issue Jul 18, 2023 · 3 comments
Labels

Comments

@SirTakobi
Copy link

SirTakobi commented Jul 18, 2023

Module

base_vat_optional_vies

Describe the bug

The module installation raises

error in vatnumber setup command: use_2to3 is invalid.

To Reproduce

Affected versions:

  • 14.0: yes

Steps to reproduce the behavior:

  1. Install the module from PyPI:
    pip install odoo14-addon-base_vat_optional_vies

Expected behavior
Module is installed.

Additional context
The issue is due to pypa/setuptools#2086.
I tried some possible solutions in #1698 with no success, the main problem is that https://pypi.org/project/vatnumber/ is no more maintained so it can't be fixed.

This prevents runboat creation, see its log (from https://runboat.odoo-community.org/api/v1/builds/b3ad64fb3-cb05-4151-b06f-e17a3f9b3fd2/init-log):

Log
+ bash /runboat/runboat-clone-and-install.sh
+ rm -fr /mnt/data/odoo-addons-dir
+ rm -fr /mnt/data/odoo-addons-dir
+ mkdir -p /mnt/data/odoo-addons-dir
+ cd /mnt/data/odoo-addons-dir
+ curl -sSL https://github.com/oca/account-financial-tools/tarball/d33805c8358694b62c1639f75343cb0678b3ee4a
+ tar zxf - --strip-components=1
+ INSTALL_METHOD=oca_install_addons
+ [[ oca_install_addons == \o\c\a\_\i\n\s\t\a\l\l\_\a\d\d\o\n\s ]]
+ oca_install_addons
+ setuptools-odoo-get-requirements --include-addons --addons-dir /mnt/data/odoo-addons-dir
/root/.local/pipx/shared/lib/python3.8/site-packages/_distutils_hack/__init__.py:18: UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.
  warnings.warn(
/root/.local/pipx/shared/lib/python3.8/site-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
  warnings.warn("Setuptools is replacing distutils.")
+ cat test-requirements.txt
numpy==1.15
numpy-financial<=1.0.0
numpy>=1.15
odoo14-addon-account_move_line_stock_info
odoo14-addon-base_sequence_option
odoo14-addon-date_range
odoo14-addon-product_category_product_link
odoo14-addon-queue_job
odoo14-addon-report_xlsx_helper
odoo>=14.0a,<14.1dev
vatnumber
+ pip install -r test-requirements.txt
Looking in indexes: https://wheelhouse.odoo-community.org/oca-simple-and-pypi
Collecting numpy==1.15 (from -r test-requirements.txt (line 1))
  Downloading numpy-1.15.0.zip (4.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.5/4.5 MB 34.0 MB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting numpy-financial<=1.0.0 (from -r test-requirements.txt (line 2))
  Downloading numpy_financial-1.0.0-py3-none-any.whl (14 kB)
Collecting odoo14-addon-account_move_line_stock_info (from -r test-requirements.txt (line 4))
  Downloading https://wheelhouse.odoo-community.org/oca-simple/odoo14-addon-account-move-line-stock-info/odoo14_addon_account_move_line_stock_info-14.0.2.3.0-py3-none-any.whl (63 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.5/63.5 kB 2.1 MB/s eta 0:00:00
Collecting odoo14-addon-base_sequence_option (from -r test-requirements.txt (line 5))
  Downloading https://wheelhouse.odoo-community.org/oca-simple/odoo14-addon-base-sequence-option/odoo14_addon_base_sequence_option-14.0.1.0.1.dev11-py3-none-any.whl (32 kB)
Collecting odoo14-addon-date_range (from -r test-requirements.txt (line 6))
  Downloading https://wheelhouse.odoo-community.org/oca-simple/odoo14-addon-date-range/odoo14_addon_date_range-14.0.2.1.2-py3-none-any.whl (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 14.6 MB/s eta 0:00:00
Collecting odoo14-addon-product_category_product_link (from -r test-requirements.txt (line 7))
  Downloading https://wheelhouse.odoo-community.org/oca-simple/odoo14-addon-product-category-product-link/odoo14_addon_product_category_product_link-14.0.1.0.1-py3-none-any.whl (20 kB)
Collecting odoo14-addon-queue_job (from -r test-requirements.txt (line 8))
  Downloading https://wheelhouse.odoo-community.org/oca-simple/odoo14-addon-queue-job/odoo14_addon_queue_job-14.0.3.3.0-py3-none-any.whl (309 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 309.6/309.6 kB 127.5 MB/s eta 0:00:00
Collecting odoo14-addon-report_xlsx_helper (from -r test-requirements.txt (line 9))
  Downloading https://wheelhouse.odoo-community.org/oca-simple/odoo14-addon-report-xlsx-helper/odoo14_addon_report_xlsx_helper-14.0.1.0.2-py3-none-any.whl (33 kB)
Requirement already satisfied: odoo<14.1dev,>=14.0a in /opt/odoo (from -r test-requirements.txt (line 10)) (14.0)
Collecting vatnumber (from -r test-requirements.txt (line 11))
  Downloading vatnumber-1.2.tar.gz (19 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
error in vatnumber setup command: use_2to3 is invalid.
[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.

@sergiocorato
Copy link

I solved using Python version 3.8.16 for v. 14.0 (having a big time to understand Odoo doesn't really support Python version shown in requirements.txt).

@moylop260
Copy link
Contributor

Fixed from #1700

@SirTakobi
Copy link
Author

Many Thanks @moylop260!

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

No branches or pull requests

3 participants