Open jamesrusso opened 9 months ago
Currently experiencing ModuleNotFoundError: No module named 'pkg_resources'
issue when running stealth()
Same issue
Same Issue
ModuleNotFoundError: No module named 'pkg_resources'
Any solutions?
Using importlib.resources
.
import importlib.resources
def from_file(name: str):
"""Read script from ./js directory"""
return (
importlib.resources.files("playwright_stealth").joinpath("js", name).read_text()
)
I'm having the same issue... Will the paveldudka PR be pushed one day?
I've run into this issue a few times, the solution being pip install setuptools
Note that installing setuptools is also more of a temporary work-around, and not a very sustainable solution. As per the setuptools docs:
Fortunately, the usage of pgk_resources
is unnecessary in this case, because accessing relative files is much easier and reliable by using __file__
. So #32 is the way to go in my opinion (#24 does the same, but unnecessarily reformats the file).
@AtuboDad It would be great if #32 could be merged and released to PyPI.
Looks like this repo is no longer maintained. We ended up forking it and take over maintenance
https://github.com/tinyfish-io/tf-playwright-stealth New artifact can be installed via:
pip install tf-playwright-stealth
This is used here:
In 3.12.0 I was getting pkg_resources not found, so perhaps setuptools needs to be a dependency?