Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

AttributeError when running CLI with version 1.6.0 #1444

Closed
jarkenau opened this issue Apr 16, 2024 · 2 comments
Closed

AttributeError when running CLI with version 1.6.0 #1444

jarkenau opened this issue Apr 16, 2024 · 2 comments
Assignees
Labels
BUG Something isn't working cli

Comments

@jarkenau
Copy link

When I install Datumaro via with pip install datumaro[default] version 1.6.0 is used. I get the following error when using the CLI, for example datum --help produces:

Traceback (most recent call last):
  File "/home/docker/.local/bin/datum", line 5, in <module>
    from datumaro.cli.__main__ import main
  File "/home/docker/.local/lib/python3.10/site-packages/datumaro/cli/__main__.py", line 11, in <module>
    from ..util.telemetry_utils import (
  File "/home/docker/.local/lib/python3.10/site-packages/datumaro/util/telemetry_utils.py", line 12, in <module>
    from datumaro.cli import commands, contexts
  File "/home/docker/.local/lib/python3.10/site-packages/datumaro/cli/commands/__init__.py", line 7, in <module>
    from . import (
  File "/home/docker/.local/lib/python3.10/site-packages/datumaro/cli/commands/download.py", line 14, in <module>
    from datumaro.components.extractor_tfds import (
  File "/home/docker/.local/lib/python3.10/site-packages/datumaro/components/extractor_tfds.py", line 49, in <module>
    tfds = lazy_import("tensorflow_datasets")
  File "/home/docker/.local/lib/python3.10/site-packages/datumaro/util/import_util.py", line 13, in lazy_import
    loader = importlib.util.LazyLoader(spec.loader)
AttributeError: 'NoneType' object has no attribute 'loader'

The error does not occur in version 1.5.2

Other specs:

Python Version: 3.10.12
Pip Version: 24.0
OS: Ubuntu 22.04

@jihyeonyi
Copy link

Hi @jarkenau,
Thank you for the reporting this bug.
I've prepared the fix (#1454).

jihyeonyi pushed a commit that referenced this issue Apr 18, 2024
…ro with default option only (#1454)

<!-- Contributing guide:
https://github.com/openvinotoolkit/datumaro/blob/develop/CONTRIBUTING.md
-->

### Summary
This is a bug fix for the issue #1444 

<!--
Resolves #111 and #222.
Depends on #1000 (for series of dependent commits).

This PR introduces this capability to make the project better in this
and that.

- Added this feature
- Removed that feature
- Fixed the problem #1234
-->

### How to test
1. uninstall tfds if it exists.
2. install datumaro with default option (`pip install datumaro[default]`
or `pip install -e .[default]`)
3. run `datum --version` or `datum --help`

### Checklist
<!-- Put an 'x' in all the boxes that apply -->
- [ ] I have added unit tests to cover my changes.​
- [ ] I have added integration tests to cover my changes.​
- [x] I have added the description of my changes into
[CHANGELOG](https://github.com/openvinotoolkit/datumaro/blob/develop/CHANGELOG.md).​
- [ ] I have updated the
[documentation](https://github.com/openvinotoolkit/datumaro/tree/develop/docs)
accordingly

### License

- [x] I submit _my code changes_ under the same [MIT
License](https://github.com/openvinotoolkit/datumaro/blob/develop/LICENSE)
that covers the project.
  Feel free to contact the maintainers if that's a concern.
- [x] I have updated the license header for each file (see an example
below).

```python
# Copyright (C) 2024 Intel Corporation
#
# SPDX-License-Identifier: MIT
```
@wonjuleee
Copy link
Contributor

Thanks @jihyeonyi, I will close this issue.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
BUG Something isn't working cli
Projects
None yet
Development

No branches or pull requests

3 participants