Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[BUG] Invalid dims in IOutputVariable raises for wrong reason #697

Open
oerc0122 opened this issue Mar 4, 2025 · 0 comments · May be fixed by #699
Open

[BUG] Invalid dims in IOutputVariable raises for wrong reason #697

oerc0122 opened this issue Mar 4, 2025 · 0 comments · May be fixed by #699
Labels
bug Something isn't working

Comments

@oerc0122
Copy link
Collaborator

oerc0122 commented Mar 4, 2025

Description of the error
Error raises due to invalid attribute rather than correct error.

Describe the expected result
Raise OutputVariableError

Describe the actual result

CRITICAL MDANSE:IJob.py:417 Job failed with traceback: Traceback (most recent call last):
  File "/home/jacob/MDANSE/MDANSE/Src/MDANSE/Framework/Jobs/IJob.py", line 395, in run
    self.initialize()
  File "/home/jacob/MDANSE/MDANSE/Src/MDANSE/Framework/Jobs/QResDynamicCoherentStructureFactor.py", line 97, in initialize
    self._outputData.add(
  File "/home/jacob/MDANSE/MDANSE/Src/MDANSE/Framework/OutputVariables/IOutputVariable.py", line 36, in add
    IOutputVariable.create(dataType, data, dataName, **kwargs),
  File "/home/jacob/MDANSE/MDANSE/Src/MDANSE/Core/SubclassFactory.py", line 176, in create
    return specific_class(*args, **kwargs)
  File "/home/jacob/MDANSE/MDANSE/Src/MDANSE/Framework/OutputVariables/IOutputVariable.py", line 85, in __new__
    f"Invalid number of dimensions for an output variable of type {cls.name!r}"
AttributeError: type object 'SurfaceOutputVariable' has no attribute 'name'

Suggested fix
Replace name with __name__

Additional details
N/A

@oerc0122 oerc0122 added the bug Something isn't working label Mar 4, 2025
@oerc0122 oerc0122 linked a pull request Mar 4, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant