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
Hy everyone, this is for real my last message. I had been trying for hours seeking for a solution but nothing.
I have created a nice code for running anuga with shapefiles and raster that can be directly taken as outputs of a GIS-program. The code runs correctly in each reasonable scenario and allows to easily simulate flooding events with solid transport, riverwalls, structures, culverts ecc...
Now I want to build an executable file with my work, in order to use it in each computer I want and eventually share it with other interested people.
In order to do that, I've freezed my python code and my evnironment using 'pyinstaller'.
The problem starts now. When I run my executable file with a hydraulic problem, while anuga creates the domain it raises an error: "'NoneType' object has no attribute 'write'". The mesh file is not even generated. I think the error is here around, maybe, because in the log file the last written words are:
"2024-05-08 19:56:51,922 CRITICAL mesh_interface:108 |Resource usage: total memory=8101.2MB free memory=1725.5MB
2024-05-08 19:56:51,925 INFO mesh_interface:108 |#@# sys_platform, win32
2024-05-08 19:56:51,929 INFO mesh_interface:108 |#@# start_total_memory, 8101.22265625
2024-05-08 19:56:51,932 INFO mesh_interface:108 |#@# start_free_memory, 1725.5234375
2024-05-08 19:56:51,936 INFO mesh_interface:110 |#@# maximum_triangle_area, 1000.0
2024-05-08 19:56:51,941 INFO mesh_interface:112 |#@# minimum_triangle_angle, 28.0
2024-05-08 19:56:51,945 INFO mesh_interface:115 |#@# startMesh, '2024-05-08 19:56:51'
2024-05-08 19:56:51,952 CRITICAL mesh_interface:373 |Generating mesh to file 'C:\Users\miche\AppData\Roaming\hydrogis\program_data\projects\fersina\idrodinamica\mesh_file.msh'"
NB: The same identical hydraulic problem gives no errors running my python code with Pycharm.
Thanks in advance for any kind of support, Best regards,
Michele Zucchelli.
The text was updated successfully, but these errors were encountered:
@mikilterribile could you also provide the full error message. Hopefully that will indicate where the error is being produced. It could be caused by some conflict in the environment created by pyinstaller
It seems to be I found the solution. The error was due to the "pprint" statement in the mesh generation. pprint needs to a default console where to print the values and using an executable file maybe the default console is "None". So I simply removed the "verbose" option (verbose = False) in the "create_domain_from_regions" function and now it seems to work.
Hy everyone, this is for real my last message. I had been trying for hours seeking for a solution but nothing.
I have created a nice code for running anuga with shapefiles and raster that can be directly taken as outputs of a GIS-program. The code runs correctly in each reasonable scenario and allows to easily simulate flooding events with solid transport, riverwalls, structures, culverts ecc...
Now I want to build an executable file with my work, in order to use it in each computer I want and eventually share it with other interested people.
In order to do that, I've freezed my python code and my evnironment using 'pyinstaller'.
The problem starts now. When I run my executable file with a hydraulic problem, while anuga creates the domain it raises an error: "'NoneType' object has no attribute 'write'". The mesh file is not even generated. I think the error is here around, maybe, because in the log file the last written words are:
"2024-05-08 19:56:51,922 CRITICAL mesh_interface:108 |Resource usage: total memory=8101.2MB free memory=1725.5MB
2024-05-08 19:56:51,925 INFO mesh_interface:108 |#@# sys_platform, win32
2024-05-08 19:56:51,929 INFO mesh_interface:108 |#@# start_total_memory, 8101.22265625
2024-05-08 19:56:51,932 INFO mesh_interface:108 |#@# start_free_memory, 1725.5234375
2024-05-08 19:56:51,936 INFO mesh_interface:110 |#@# maximum_triangle_area, 1000.0
2024-05-08 19:56:51,941 INFO mesh_interface:112 |#@# minimum_triangle_angle, 28.0
2024-05-08 19:56:51,945 INFO mesh_interface:115 |#@# startMesh, '2024-05-08 19:56:51'
2024-05-08 19:56:51,952 CRITICAL mesh_interface:373 |Generating mesh to file 'C:\Users\miche\AppData\Roaming\hydrogis\program_data\projects\fersina\idrodinamica\mesh_file.msh'"
NB: The same identical hydraulic problem gives no errors running my python code with Pycharm.
Thanks in advance for any kind of support, Best regards,
Michele Zucchelli.
The text was updated successfully, but these errors were encountered: