berndporr / py-ecg-detectors

Popular ECG QRS detectors written in python
GNU General Public License v3.0
353 stars 82 forks source link

long_description in setup issue #22

Closed Koaha closed 1 year ago

Koaha commented 1 year ago

Hi,

It seems that the f.read() in setup.py for the long_description has a problem with encoding.

File "C:\Users\Koha\AppData\Local\Temp\pip-install-_i_lu5wz\py-ecg-detectors_cab3225f72c3476ea1207fffa3e5d3fe\setup.py", line 6, in long_description = f.read() ^^^^^^^^ File "C:\Python311\Lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0]

So I have to walk around by removing the long_description in the setup file

My python version is 3.9

berndporr commented 1 year ago

Soooo which character in the long description makes it trip over? Have you tried to install via pip?

berndporr commented 1 year ago

Oh, and you say you are using Python 3.9 but clearly the library is Python 3.11. That doesn't look right. So I guess there is some inconsistency with the python version.

Koaha commented 1 year ago

Ya, my friend got this problem when he installed it through pip - python 3.9. So I tried with your original github and got the same issue. Anyway, we successfully installed, but have to take away the long_description

berndporr commented 1 year ago

Looks like that the default behaviour for code pages has changed and that older python installs use the windows codepage cp1252. Just pushing a new version to pypi.

berndporr commented 1 year ago

@careen28 has the same issue. Since I'm a Linux person can you try out with the newest version 1.3.4 if the crash with the "long_description" is now gone?

careen28 commented 1 year ago

I succeeded installing the module !pip3 install py-ecg-detectors Requirement already satisfied: py-ecg-detectors in c:\users\gigabiyte\appdata\roaming\python\python39\site-packages (1.3.4) Requirement already satisfied: gatspy in c:\users\gigabiyte\appdata\roaming\python\python39\site-packages (from py-ecg-detectors) (0.3) Requirement already satisfied: scipy in c:\users\gigabiyte\anaconda3\lib\site-packages (from py-ecg-detectors) (1.9.1) Requirement already satisfied: pywavelets in c:\users\gigabiyte\anaconda3\lib\site-packages (from py-ecg-detectors) (1.3.0) Requirement already satisfied: numpy in c:\users\gigabiyte\anaconda3\lib\site-packages (from py-ecg-detectors) (1.21.5)

, but now I'm facing this problem
from ecgdetectors import Detectors ModuleNotFoundError Traceback (most recent call last) ~\AppData\Local\Temp\ipykernel_12924\2944482465.py in ----> 1 from ecgdetectors import Detectors

ModuleNotFoundError: No module named 'ecgdetectors'

berndporr commented 1 year ago
Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ecgdetectors import Detectors
>>> help(Detectors)

Work here without any problem. Sorry but that looks like a local problem at your end and certainly unrelated to the character encoding. That's been resolved. Closing it now,.