Mahsa Alidadi
Mahsa Alidadi

Reputation: 105

No module named 'PyCRC'

I want tou use ECGRecord package which I installed it using pip. but when I run my code it says No module named 'PyCRC' despite I installed both pycrc and ECGRecord.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\asus\AppData\Local\Programs\Python\Python36\lib\site-packages\pyecg\__init__.py", line 6, in <module>
    from pyecg.dataset import RecordTicket, ECGDataset
  File "C:\Users\asus\AppData\Local\Programs\Python\Python36\lib\site-packages\pyecg\dataset.py", line 12, in <module>
    from ishneholterlib import Holter
  File "C:\Users\asus\AppData\Local\Programs\Python\Python36\lib\site-packages\ishneholterlib\__init__.py", line 9, in <module>
    from PyCRC.CRCCCITT import CRCCCITT
ModuleNotFoundError: No module named 'PyCRC'

when I searched for solving this issue, I found this solution on GitHub:

fixed by changing manifest.json:

{
"domain": "hysen",
"name": "Hysen Thermostat Controller",
"documentation": "",
"requirements": ["broadlink==0.13.0", "pythoncrc"],
"dependencies": [
"http"
],
"codeowners": ["@MarkCarter", "@iwantto.com"]
}

but I don't know what is "manifest.json" and where can I find it. How can I solve this issue?

I want to open a database with *.ecg format:

from pyecg import ECGRecord


# To load a ishine formatted ECG record
hea_path = "/path/to/your/ecg/file"
record = ECGRecord.from_ishine(hea_path)

Upvotes: 1

Views: 5418

Answers (2)

Nathan Thomas
Nathan Thomas

Reputation: 1

https://github.com/taoyilee/pyECG/issues/3#issuecomment-866048577 Solution is thanks to carlosperezm:

Commit 95f854c introduced a fix, but it was not pushed to Pypi. What worked for me was:

pip uninstall PyCRC
pip install pythoncrc

Upvotes: 0

Mattwmaster58
Mattwmaster58

Reputation: 2576

The issue you found on GitHub isn't related to your case - hence why you couldn't find the manifest.json file. It just so happened that a possible error with that library was the same error you're having here - No module named PyCRC. There's an open issue on the pyECG repo with this exact problem. The solution there is to simply pip install pythoncrc. If you've already tried this, I would make sure you are installing it to the right location - for example, if you're using a venv to run your code I'd make sure the package is being installed in the venv.

Upvotes: 1

Related Questions