equinor / dlisio

Python library for working with the well log formats Digital Log Interchange Standard (DLIS V1) and Log Information Standard (LIS79)
https://dlisio.readthedocs.io/en/latest/
Other
121 stars 39 forks source link

AttributeError: 'LogicalFile' object has no attribute 'curves'" #387

Closed BGogoi2 closed 3 years ago

BGogoi2 commented 3 years ago

I am using the code from the tutorial- with dlis.load("filename") as files: for f in files: for frame in f.frames: curves = f.curves()

But it is saying "AttributeError: 'LogicalFile' object has no attribute 'curves'" How to encounter this problem?

achaikou commented 3 years ago

Hi! Notice that curves is a method on Frame (frame), not on LogicalFile (f).

Below should work

with dlis.load("filename") as files:
    for f in files:
        for frame in f.frames:
            curves = frame.curves()
BGogoi2 commented 3 years ago

Thank you so much! It works. Could you also change the code in the tutorial example so that it becomes helpful for the new users?

achaikou commented 3 years ago

Thank you for pointing that out, done!