You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the new load_templates method on the ADR service class, to import a report template from a JSON file, you get errors if the template to be imported is of merge table generator type.
Use pydynamicreporting to start / connect to a running service:
import ansys.dynamicreporting.core as adr
a = adr.Service(db_directory=r'''D:\tmp\test''')
a.start(create_db=True)
Now, load the attached json file:
a.load_templates(r'''D:\tmp\test_report.json''')
This returns this error:
File "c:\ansysdev\nobackup\pyansys\pyadr\src\ansys\dynamicreporting\core\utils\report_remote_server.py", line 1155, in _check_template
raise exceptions.TemplateEditorJSONLoadingError(
ansys.dynamicreporting.core.utils.exceptions.TemplateEditorJSONLoadingError: The loaded JSON file has an invalid 'report_type' value: 'Generator:tablemerge'
🔍 Before submitting the issue
🐞 Description of the bug
When using the new load_templates method on the ADR service class, to import a report template from a JSON file, you get errors if the template to be imported is of merge table generator type.
test_report.json
📝 Steps to reproduce
Use pydynamicreporting to start / connect to a running service:
import ansys.dynamicreporting.core as adr
a = adr.Service(db_directory=r'''D:\tmp\test''')
a.start(create_db=True)
Now, load the attached json file:
a.load_templates(r'''D:\tmp\test_report.json''')
This returns this error:
File "c:\ansysdev\nobackup\pyansys\pyadr\src\ansys\dynamicreporting\core\utils\report_remote_server.py", line 1155, in _check_template
raise exceptions.TemplateEditorJSONLoadingError(
ansys.dynamicreporting.core.utils.exceptions.TemplateEditorJSONLoadingError: The loaded JSON file has an invalid 'report_type' value: 'Generator:tablemerge'
The template type is actually valid.
test_report.json
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
25R2
🐍 Which Python version are you using?
3.10
📦 Installed packages
The text was updated successfully, but these errors were encountered: