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

load templates do not work with template merge generator #244

Open
2 tasks done
margalva opened this issue Jan 29, 2025 · 1 comment
Open
2 tasks done

load templates do not work with template merge generator #244

margalva opened this issue Jan 29, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@margalva
Copy link
Collaborator

🔍 Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

🐞 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

pydynamicreporting
@margalva margalva added the bug Something isn't working label Jan 29, 2025
@zhang-yuanrui
Copy link
Collaborator

See PR: #248

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

No branches or pull requests

2 participants