Welcome, Guest
Username: Password: Remember me

TOPIC: Exception in thread

Exception in thread 1 year 1 month ago #42424

  • lyybert
  • lyybert's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 24
When I run the model, I get the situation like this and it cannot run. Could anyone told me how to deal this problem?

Exception in thread Thread-2 (print_twice):
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/home/bert/Telemac/Build_Telemac/Telemac/scripts/python3/execution/process.py", line 696, in print_twice
print(dat.decode('utf-8'))
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 27-28: invalid continuation byte
The administrator has disabled public write access.

Exception in thread 1 year 1 month ago #42425

  • c.coulet
  • c.coulet's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 3643
  • Thank you received: 1012
Hi
There is somewhere in one of your file a character which is non utf-8 compliant...
This could be a comment or something else...

Regards
Christophe
The administrator has disabled public write access.

Exception in thread 1 year 1 month ago #42427

  • lyybert
  • lyybert's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 24
Yes, I think this information occur when the program read the list and print it on screen. But I do not know the exact cause of the problem. Could you give me more information? I attached the screenshot. Hope your rely.
Attachments:
The administrator has disabled public write access.

Exception in thread 1 year 1 month ago #42428

  • c.coulet
  • c.coulet's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 3643
  • Thank you received: 1012
Hard to say as the screenshot doesn't give more informations on crash.
As there is a mention of an ascii file this is potentially the cause of the problem.
Christophe
The administrator has disabled public write access.

Exception in thread 1 year 1 month ago #42429

  • lyybert
  • lyybert's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 24
Do you mean the problem may be cause by an ascii input file of the case?
The administrator has disabled public write access.

Exception in thread 1 year 1 month ago #42430

  • c.coulet
  • c.coulet's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 3643
  • Thank you received: 1012
By a wrong character in an ascii input file yes
Christophe
The administrator has disabled public write access.
The following user(s) said Thank You: lyybert

Exception in thread 1 year 1 month ago #42432

  • lyybert
  • lyybert's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 24
Hi,
I found even the python threw that error, the fortran program still run well. I attach the temporary file. Does it affect the final result of the run?
By the way, could you tell me how to set a tracer as an active tracer such as salinity or temperature making it have effect on the density of the water?
Attachments:
The administrator has disabled public write access.

Exception in thread 1 year 1 month ago #42433

  • c.coulet
  • c.coulet's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 3643
  • Thank you received: 1012
.log are not permitted (see rules)
Final result should not be affected by running fortran program as this is just a python problem.
Not sure to fully understand your question.
For me, only Temperature and salinity could have an effect on density in telemac 3D by default. Defining a new active tracer implies modifying some subroutine and adding new density laws...
Christophe
The administrator has disabled public write access.
The following user(s) said Thank You: lyybert

Exception in thread 1 year 1 month ago #42434

  • lyybert
  • lyybert's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 24
For the first question, I did not get the final result file after the calculation. But the log files show the fortran program finished correctly. I think the problem should not from the coding of the input file. Maybe it comes from the python itself. If I comment the python sentence that throw the error, the screen print disappear but the fortran program works well. The error occurs in /python3/execution/process.py, in line 696:print(dat.decode('utf-8')).
For the second question, how I can enable the calculation of temperature and salinity? Just add tracers named temperature or salinity? I did found the detail description users' manual. I
The administrator has disabled public write access.

Exception in thread 1 year 1 month ago #42473

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1478
  • Thank you received: 568
Hello,

You should read the TELEMAC-3D user manual and the TELEMAC-3D examples more carefully:
- define a tracer with name TEMPERATURE or SALINITY,
- choose how you want the density vary with the keyword DENSITY LAW.

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.