question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

module level dunder names not appearing in __init__.py

See original GitHub issue

Bug Report

Python 3.10.2 | packaged by conda-forge | (main, Mar  8 2022, 16:02:23) [Clang 11.1.0 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import opentimelineio as otio
>>> otio.__version__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'opentimelineio' has no attribute '__version__'

This is a regression from 0.14, see here: https://github.com/PixarAnimationStudios/OpenTimelineIO/issues/1224

Expected Behavior

Description of the expected behavior.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
JeanChristopheMorinPersocommented, Mar 23, 2022

Pull request created, but without tests. Testing that would either require to have PySide installed or we would have to parse the files which I feel is dirty…

1reaction
meshulacommented, Mar 23, 2022

As part of a fix, let’s add a test if possible, that the module level dunder names exist.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - What is __init__.py for? - Stack Overflow
It used to be a required part of a package (old, pre-3.3 "regular package", not newer 3.3+ "namespace package"). Here's the documentation. Python...
Read more >
6. Modules — Python 3.11.1 documentation
These module names are listed in sys.builtin_module_names . If not found, it then searches for a file named spam.py in a list of...
Read more >
What's __init__ for me? Designing for Python package imports
This will define what gets brought into the namespace with the import statement.
Read more >
Package Initialization - Real Python
In this lesson, you'll learn about package initialization. If a file named __init__.py is present in a package directory, it is invoked when...
Read more >
What is __init__.py? and what should I put in it?
Since this approach does not allow non-import code in the __init__.py , it seems to suffer from the namespace issue described in #1...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found