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

[16.0] Unable to install sentry-sdk dependency: urllib3 conflict #2927

Open
1 task
kamzata opened this issue Apr 30, 2024 · 3 comments
Open
1 task

[16.0] Unable to install sentry-sdk dependency: urllib3 conflict #2927

kamzata opened this issue Apr 30, 2024 · 3 comments
Labels

Comments

@kamzata
Copy link

kamzata commented Apr 30, 2024

sentry-sdk installation is not possible on Odoo 16 due to urllib3 conflict.

venv16 ~ pip install sentry-sdk

Collecting sentry-sdk
  Using cached sentry_sdk-2.0.1-py2.py3-none-any.whl (266 kB)
Requirement already satisfied: certifi in ./venv16/lib/python3.10/site-packages (from sentry-sdk) (2023.11.17)
Collecting urllib3>=1.26.11
  Using cached urllib3-2.2.1-py3-none-any.whl (121 kB)
Installing collected packages: urllib3, sentry-sdk
  Attempting uninstall: urllib3
    Found existing installation: urllib3 1.26.5
    Uninstalling urllib3-1.26.5:
      Successfully uninstalled urllib3-1.26.5
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
requests 2.25.1 requires urllib3<1.27,>=1.21.1, but you have urllib3 2.2.1 which is incompatible.
Successfully installed sentry-sdk-2.0.1 urllib3-2.2.1

Module

Sentry

Bug Description

sentry-sdk requires a minor urllib3 version

To Reproduce

Affected versions:

  • 16.0

Steps to reproduce the behavior:

  1. pip install sentry-sdk

Expected behavior
sentry-sdk working

Additional context
Odoo 16.0 on Ubuntu 22.04 using Python 3.10.12

@kamzata kamzata added the bug label Apr 30, 2024
@angelvilaplana
Copy link

Hi @kamzata, this error occurs because Odoo requires urllib3 == 1.26.5 and sentry-sdk > 1.9.0 required urllib3 >= 1.26.11 (#2649). If you go to requirements.txt (https://github.com/OCA/server-tools/blob/16.0/requirements.txt) you can see that you must install sentry_sdk equal to or lower than 1.9.0 version.

Try to install sentry_sdk but indicating the version (pip3 install sentry_sdk==1.9.0). In theory, doing this should work.

@kamzata
Copy link
Author

kamzata commented May 1, 2024

Thanks, now it seems to work. Should I install all other dependencies as well ( pip install -r server-tools/blob/16.0/requirements.txt ) ?

I wanted to self-host the Sentry server but since Sentry doesn't seem to be open source anymore and since it's not as lightweight as I thought, I opted for GlitchTip which uses the Sentry SDK anyway.

Do you know GlitchTip? What do you think about?

It would be great to have error tracking for both backend and Odoo frontend. I'd be happy to help in the next future but I'm approaching Odoo just now.

@angelvilaplana
Copy link

Hi @kamzata, Great! I'm glad it works now. In principle, if you only want to install the sentry module, with that dependency it would be enough. Because if you go to the module manifest you can see that it only requires that dependency.

The truth is that in the company where I work we've Sentry SaaS version and self-hosted. And the truth is that the self-host docker compose is huge. I didn't know about GlitchTip. I find it interesting. Maybe I'll try it too. In principle, if it's use Sentry SDK should work the same.

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

2 participants