KEMBAR78
[package] os.path error · Issue #57490 · pytorch/pytorch · GitHub
Skip to content

[package] os.path error #57490

@Lilyjjo

Description

@Lilyjjo

🐛 Bug

Importing os.path causes PackageImporter to throw this error:

  File "/home/lillianjohnson/local/pytorch/torch/package/package_importer.py", line 377, in _find_and_load
    return self._do_find_and_load(name)
  File "/home/lillianjohnson/local/pytorch/torch/package/package_importer.py", line 365, in _do_find_and_load
    raise ModuleNotFoundError(msg, name=name) from None
ModuleNotFoundError: No module named 'os.path'; 'os' is not a package

To Reproduce

Add this line to a module that is being imported, and then try to package an object that is dependent on the module:

import os.path

Metadata

Metadata

Assignees

Labels

triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions