Skip to content

urlwatch in a python3 virtual environment failing after upgrade to Trixie #850

@juasiepo

Description

@juasiepo

After upgrading to Trixie I have started receiving this messages:

Traceback (most recent call last):
  File "/usr/lib/python3.13/importlib/metadata/__init__.py", line 407, in from_name
    return next(iter(cls.discover(name=name)))
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/juan/.urlwatch/.venv/bin/urlwatch", line 33, in <module>
    sys.exit(load_entry_point('urlwatch==2.28', 'console_scripts', 'urlwatch')())
             ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/juan/.urlwatch/.venv/bin/urlwatch", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
                       ~~~~~~~~~~~~^^^^^^^^^^^
  File "/usr/lib/python3.13/importlib/metadata/__init__.py", line 960, in distribution
    return Distribution.from_name(distribution_name)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/importlib/metadata/__init__.py", line 409, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for urlwatch

I deleted the virtual environment and started from scratch following the instructions on https://urlwatch.readthedocs.io/en/latest/dependencies.html

Now I am getting error regarding two missing modules that are installed:

---------------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urlwatch/handler.py", line 120, in process
    data = FilterBase.process(filter_kind, subfilter, self, data)
  File "/usr/lib/python3/dist-packages/urlwatch/filters.py", line 188, in process
    return filtercls(state.job, state).filter(data, subfilter)                                                                                                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/urlwatch/filters.py", line 396, in filter
raise ImportError('Please install pdftotext')
ImportError: Please install pdftotext
---------------------------------------------------------------------------
---------------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urlwatch/handler.py", line 113, in process
data = self.job.retrieve(self)
File "/usr/lib/python3/dist-packages/urlwatch/jobs.py", line 442, in retrieve
from playwright.sync_api import sync_playwright
ModuleNotFoundError: No module named 'playwright'
---------------------------------------------------------------------------
pip install playwright pdftotext
Requirement already satisfied: playwright in ./.venv/lib/python3.13/site-packages (1.54.0)
Requirement already satisfied: pdftotext in ./.venv/lib/python3.13/site-packages (3.0.0)
Requirement already satisfied: pyee<14,>=13 in ./.venv/lib/python3.13/site-packages (from playwright) (13.0.0)
Requirement already satisfied: greenlet<4.0.0,>=3.1.1 in ./.venv/lib/python3.13/site-packages (from playwright) (3.2.4)
Requirement already satisfied: typing-extensions in ./.venv/lib/python3.13/site-packages (from pyee<14,>=13->playwright) (4.14.1)

poppler-utils are installed too

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions