Cannot open Database file

Hi
I’m using anaconda and I’m working from the Anaconda Prompt.
(When I work from the cmd the Conda, Pip, etc are not recognized).

I am trying to read a database file of mit-bih arrhythmia.

But always get errors.

Have you got an advice please?

Thanks.

I’m reminded of an old joke. A man goes to the doctor. The doctor says
“What seems to be the problem?”

And the man says “You’re the doctor, you tell me.”

Can you please copy and paste the full error message you are getting,
starting with the line “Traceback”. Otherwise we have to guess. Help us
help you.

Thank you.

Hi Steven

Thanks so much for the time to reply.

This is what I get.

Hi Tryggg,

All I see is this:

![download_20210619_040023|690x149](upload://eYH5uV2rHKQGWp9z6NGM1I3Ftko.png)

which is of no use at all. Can you please copy and paste the full
error message you are getting, starting with the line “Traceback”? Thank
you.

Hi Steven

Thanks a lot for your time.

I attach the code that I am running.

Tryggg,

Please help us to help you.

There is no point in continuing to post pictures of your code. We don’t
write code with Photoshop, we need the code as text. Some of us,
including me, can’t easily or at all see screenshots. All I see is this:

![download_20210620_042316|690x141](upload://jbvj8jqBVpbXGKZVeCMb87dyfZd.jpeg)

which is not helpful.

As I asked earlier, please start by copying and pasting the full
error message you are getting, starting with the line “Traceback”.

Not a photo, not a screenshot, not a summary or a vague description of
what you remember from it. We need to see the actual traceback, in full.

We might be able to solve your problem from the information in the
traceback. If not, it will help if you post your code as text (not a
screenshot, not a photo) but for now let’s start with just the
traceback and see if that is enough.

Thank you.

Hi Steven
Thanks so much for the patience.

I’ll update.

The code I run is

××××××××××××××××××××××××××

import wfdb

record = wfdb.rdsamp(‘bidmc-ppg-and-respiration-dataset-1.0.0/bidmc02’, sampto=3000)

annotation = wfdb.rdann(‘bidmc-ppg-and-respiration-dataset-1.0.0/bidmc02’, ‘atr’, sampto=3000)

#wfdb.plotrec(record, annotation = annotation,

title=‘Record 100 from MIT-BIH Arrhythmia Database’,

timeunits = ‘seconds’, figsize = (10,4), ecggrids = ‘all’)

wfdb.plotrec(record, title=‘Record 100 from MIT-BIH Arrhythmia Database’, timeunits = ‘seconds’)

×××××××××××××××××××××××××××

The database is from
https://archive.physionet.org/physiobank/database/bidmc/

I don’t get an error, but I don’t get a plot of the database.

Am I missing something?

Thanks alor for the time and support

What I get is the attached photo

Hi Tryggg,

You are using a library which is not very well known. I had never heard

of wfdb until now, and the documentation confuses me:

https://wfdb.readthedocs.io/en/latest/wfdb.html

Maybe it will mean more to you.

The closest thing to a tutorial is this:

Maybe you can try installing IPython and try running the notebook, and

see if that works for you?

Looking at your code, and the fact that you are not getting an error, my

guess is that you are opening the database correctly. You can try this

experiment:

Deliberately change the database name to something you know is wrong:

record = wfdb.rdsamp('xxxx-xxxx-xxxx/xxxx', sampto=3000)

Do you get an error now? If you do get an error, then SUCCESS! That

means that in your real code, the lack of error means that you are

correctly opening the database.

If you get no error, and the code just silently moves on to the next

line, then I don’t know what else to suggest.