abqpy icon indicating copy to clipboard operation
abqpy copied to clipboard

Abaqus Types and Exceptions are not recognised

Open phi6ias opened this issue 5 months ago • 1 comments

It's maybe half bug - half feature request, but most Abaqus Types and Exceptions are not recognised by the linter.

  1. The module abaqusExceptions and exceptions than can be imported from it are not recognised.

To make matters worse, sometimes the Abaqus documentation states exceptions that should be thrown, but actually another will be thrown instead. The reason may be incomplete documentation though, like in the instance of openMdb(). This is documented as throwing the MdbError exception in any case, but actually an IOError is thrown when the path to the file is incorrect.

Excerpt from the AbaqusCAE Terminal showing where the module lives:

 >>> import abaqusExceptions as abq_exc
>>> abq_exc
<module 'abaqusExceptions' from 'C:\Programme\SIMULIA\EstProducts\2022\win_b64\code\python2.7\lib\abaqusExceptions.pyc'>
  1. Types from Abaqus are not recognised.

I don't think all Abaqus Types are stored in one module.

Excerpt from the AbaqusCAE Terminal showing an example of what is available:

>>> import abaqusConstants as ABQC
>>> ABQC.SymbolicConstant
<class 'symbolicConstants.SymbolicConstant'>
>>> type(ABQC.SymbolicConstant)
<type 'type'>
>>> NoneType
<type 'NoneType'>
>>> ABQC.NoneType
AttributeError: 'module' object has no attribute 'NoneType'
>>> import abaqus as abq_core
>>> abq_core.NoneType
<type 'NoneType'>

Versions:

Abaqus 2022.HF1 abqpy 2022.7.7

phi6ias avatar Sep 25 '24 20:09 phi6ias