Replies: 1 comment
-
This is duplicated #3951 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
hi,
I would like to export report to jpg file on Circuit, so I call pyaedt.Crcuit.post.export_jpg_to_file( ) function, but I got errors. Dose anyone get same issue? How can I fix it? By the way, my computer OS is Linux, AEDT version is 2022R2, and pyaedt version is v0.7.6.
Below is the error code :
(pyaedt) fea@fea-DGX-Station:~/Desktop/USB4_Automation$ /home/fea/anaconda3/envs/pyaedt/bin/python /home/fea/Desktop/USB4_Automation/test.py
Initializing new desktop!
PyAEDT INFO: StdOut is enabled
PyAEDT INFO: Log on file is enabled
PyAEDT INFO: Log on Desktop Message Manager is disabled
PyAEDT INFO: Debug logger is disabled. PyAEDT methods will not be logged.
PyAEDT INFO: Launching PyAEDT outside AEDT with gRPC plugin.
PyAEDT INFO: Launching AEDT using the gRPC plugin.
PyAEDT INFO: New AEDT session is starting on gRPC port 42029
PyAEDT INFO: AEDT installation Path /opt/AnsysEM/v222/Linux64
PyAEDT INFO: Ansoft.ElectronicsDesktop.2022.2 version started with process ID 2607129.
PyAEDT INFO: pyaedt v0.7.6
PyAEDT INFO: Python version 3.10.12 (main, Jul 5 2023, 18:54:27) [GCC 11.2.0]
PyAEDT INFO: AEDT 2022.2.0 Build Date 2022-05-26 21:47:52
PyAEDT INFO: Project Project17 has been created.
PyAEDT INFO: No design is present. Inserting a new design.
PyAEDT INFO: Added design 'Circuit Design_NDE' of type Circuit Design.
PyAEDT INFO: Aedt Objects correctly read
Returning found desktop with PID 2607129!
PyAEDT INFO: Project USB4_TDR set to active.
PyAEDT INFO: Active Design set to Circuit Design_9JU
PyAEDT INFO: Aedt Objects correctly read
PyAEDT INFO: aedt file load time 0.07906007766723633
PyAEDT INFO: ModelerCircuit class has been initialized! Elapsed time: 0m 0sec
PyAEDT INFO: ModelerNexxim class has been initialized!
PyAEDT ERROR: AEDT GRPC API CALL ERROR on export_report_to_jpg
PyAEDT ERROR: Failed to execute grpc AEDT command: ExportImageToFile
PyAEDT ERROR: File "/home/fea/Desktop/USB4_Automation/test.py", line 14, in
PyAEDT ERROR: plot = post.export_report_to_jpg(project_dir=save_path, plot_name=plot_name, width=1550, height=660)
PyAEDT ERROR: File "/home/fea/anaconda3/envs/pyaedt/lib/python3.10/site-packages/pyaedt/modules/PostProcessor.py", line 1327, in export_report_to_jpg
Traceback (most recent call last):
File "/home/fea/anaconda3/envs/pyaedt/lib/python3.10/site-packages/pyaedt/generic/grpc_plugin.py", line 120, in Invoke
return _retry_ntimes(
File "/home/fea/anaconda3/envs/pyaedt/lib/python3.10/site-packages/pyaedt/generic/general_methods.py", line 712, in _retry_ntimes
raise AttributeError("Error in Executing Method {}.".format(function.name))
AttributeError: Error in Executing Method InvokeAedtObjMethod.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/fea/anaconda3/envs/pyaedt/lib/python3.10/site-packages/pyaedt/generic/general_methods.py", line 188, in wrapper
out = user_function(*args, **kwargs)
File "/home/fea/anaconda3/envs/pyaedt/lib/python3.10/site-packages/pyaedt/modules/PostProcessor.py", line 1327, in export_report_to_jpg
self.oreportsetup.ExportImageToFile(plot_name, file_name, width, height)
File "/home/fea/anaconda3/envs/pyaedt/lib/python3.10/site-packages/pyaedt/generic/grpc_plugin.py", line 133, in DynamicFunc
return self.Invoke(funcName, args)
File "/home/fea/anaconda3/envs/pyaedt/lib/python3.10/site-packages/pyaedt/generic/grpc_plugin.py", line 124, in Invoke
raise GrpcApiError("Failed to execute grpc AEDT command: {}".format(funcName))
pyaedt.generic.general_methods.GrpcApiError: Failed to execute grpc AEDT command: ExportImageToFile
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/fea/Desktop/USB4_Automation/test.py", line 14, in
plot = post.export_report_to_jpg(project_dir=save_path, plot_name=plot_name, width=1550, height=660)
File "/home/fea/anaconda3/envs/pyaedt/lib/python3.10/site-packages/pyaedt/generic/general_methods.py", line 227, in wrapper
_exception(sys.exc_info(), user_function, args, kwargs, "AEDT grpc API call Error")
File "/home/fea/anaconda3/envs/pyaedt/lib/python3.10/site-packages/pyaedt/generic/general_methods.py", line 120, in _exception
message_to_print = messages[messages.index("[error]") :]
ValueError: substring not found
Beta Was this translation helpful? Give feedback.
All reactions