Skip to content

WaPOR internal import clash #12

@Prikaziuk

Description

@Prikaziuk

Dear wateraccounting,

Thank you for the great code and tutorial on the water productivity!

I have encountered a small bug that kills Module_0 notebook.
During the import WaPOR is imported from ../Modules folder with the name WaPOR.
When called as WaPOR.download_yearly() or any other download function from that module it fails with "WaPOR has no attribute API in L31 of download_yearly.py". I figured that this is due to re-importing WaPOR within download_yearly.py, L7.

Worked solution:
import WaPOR as wp in Module_0 notebook and call respective functions as wp.download_yearly() instead of WaPOR.download_yearly()

Could you consider updating the notebook, please?

Best regards,
Egor

PS could you also make paths Linux-compatible, for example with using

from pathlib import Path
output_dir = Path('..', 'Data')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions