-
Notifications
You must be signed in to change notification settings - Fork 341
Open
Description
The below import creates a missing dependency from pkg_resources
which is not declared in the heartpy
package itself.
from pkg_resources import resource_filename |
The below is enough to reproduce:
pip install heartpy
python -c "import heartpy"
This will throw the following stacktrace:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\dev\python\heartpy\.venv\lib\site-packages\heartpy\__init__.py", line 1, in <module>
from .heartpy import *
File "C:\dev\python\heartpy\.venv\lib\site-packages\heartpy\heartpy.py", line 15, in <module>
from .datautils import get_data, get_samplerate_mstimer, get_samplerate_datetime,\
File "C:\dev\python\heartpy\.venv\lib\site-packages\heartpy\datautils.py", line 6, in <module>
from pkg_resources import resource_filename
ModuleNotFoundError: No module named 'pkg_resources'
In the documentation it is stated:
heartrate_analysis_python/heartpy/datautils.py
Lines 57 to 58 in e3d80c2
For this we use pkg_resources for automated testing purposes, you don't need | |
this when using the function. |
Sadly, the above import makes this statement incorrect, as pkg_resources
is imported no matter what at the top of the file. Even worse, this dependency is not declared at the level of the wheel package, so simply installing heartpy
is not enough to have a working environment.
Metadata
Metadata
Assignees
Labels
No labels