Skip to content

Issue with logging.py when working interactively in VSCode #129

@mphemming

Description

@mphemming

Just a note that I had the following error when importing any packages and using the VSCode IDE/Jupyter notebook:

AttributeError: partially initialized module 'logging' has no attribute 'Logger' (most likely due to a circular import)
12:05:50.034 [info] Process Execution: ~/aodn_cloud_optimised/bin/python -c "import ipykernel;print('6af208d0-cb9c-427f-b937-ff563e17efdf')"

Seems this happens because Python is finding the local logging.py in aodn_cloud_optimised instead of the standard library logging module.

I fixed this by renaming logging.py to loggin.py and editing the lines in files that import the package.

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