Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Error compiling trunk with python3

Error compiling trunk with python3 5 years 9 months ago #32831

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Hello all,
I tried compiling the trunk using python3 scripts and got repeated errors like the one shown below:
I am using WinPython 3.7.1.
Compiling with python27 scripts works fine.
Any suggestions would be very welcome.
Best Regards,
Costas
O:\>compile_telemac.py --clean -j1 -f O:\trunk\configs\systel_gfmsmpi.cfg -c gfmsmpi  1>compile_output_trunk_gfmsmpi.txt
Process ParaProcess-1:                                           ]   0%  | ---s
Traceback (most recent call last):
  File "C:\Users\cyamin\WPy-3710\python-3.7.1.amd64\lib\multiprocessing\process.py", line 297, in _bootstrap
    self.run()
  File "O:\trunk\scripts\python3\utils\messages.py", line 314, in run
    self.fct(*self.args)
  File "O:\trunk\scripts\python3\utils\messages.py", line 259, in run_cmd
    code.value = sp.call(exe, shell=True)
  File "C:\Users\cyamin\WPy-3710\python-3.7.1.amd64\lib\subprocess.py", line 317, in call
    with Popen(*popenargs, **kwargs) as p:
  File "C:\Users\cyamin\WPy-3710\python-3.7.1.amd64\lib\subprocess.py", line 769, in __init__
    restore_signals, start_new_session)
  File "C:\Users\cyamin\WPy-3710\python-3.7.1.amd64\lib\subprocess.py", line 1113, in _execute_child
    args = list2cmdline(args)
  File "C:\Users\cyamin\WPy-3710\python-3.7.1.amd64\lib\subprocess.py", line 524, in list2cmdline
    needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: argument of type 'int' is not iterable
    - completed: ...trunk\sources\utils\special\declarations_special.F
Process ParaProcess-2:                                           ]   0%  | ---s
The administrator has disabled public write access.

Error compiling trunk with python3 5 years 9 months ago #32861

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Update:
Also checked with v8p0r0 tag and the same problem applies. Still, using Python 2.7 along with the scripts in python27 folder works as usual.
Has anyone used Python 3.7.1 to (successfully) compile telemac?
Regards,
Costas
The administrator has disabled public write access.

Error compiling trunk with python3 5 years 9 months ago #32869

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
I have compiled telemac with Python 3 but not on windows.
Could you try without the option -j1 ?
There are 10 types of people in the world: those who understand binary, and those who don't.
The administrator has disabled public write access.

Error compiling trunk with python3 5 years 9 months ago #32871

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Hello yugi,
I did try without it in the first place and it did not make any difference anyway. I added it only because the error was in the subprocess module and because I wanted to have one error message after the other, not pouring in from all processes.
In the meantime:
  • I compiled with python27, and tried to run some examples with python3 and as it turns out, I have other problems with computations as well. But one thing at a time.
  • I tried WinPython 3.6.7 (instead of 3.7.1) and it did not make any difference.
Costas
The administrator has disabled public write access.

Error compiling trunk with python3 5 years 8 months ago #33191

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
I have revisited the (still unsolved) issue and now I am getting this error during the import stage. It is very puzzling and I am posting it in case anyone has encountered it before.
Traceback (most recent call last):
  File "\\hydra\opentelemac\trunk\scripts\python3\compile_telemac.py", line 15, in <module>
    from compilation.compil_tools import compile_api_files, \
  File "\\hydra\opentelemac\trunk\scripts\python3\compilation\compil_tools.py", line 17, in <module>
    from utils.files import create_directories, put_file_content, is_newer
  File "\\hydra\opentelemac\trunk\scripts\python3\utils\files.py", line 51, in <module>
    from urllib.request import urlopen
ImportError: No module named request

I tried importing from urllib in a clean python window and it works fine.

Costas
The administrator has disabled public write access.

Error compiling trunk with python3 5 years 8 months ago #33194

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
This looks like the error you would get if you were running the script with python2.

How are your running the compilation ?
There are 10 types of people in the world: those who understand binary, and those who don't.
The administrator has disabled public write access.
The following user(s) said Thank You: cyamin

Error compiling trunk with python3 5 years 8 months ago #33195

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Good point, I am running a plain script and let the environmental variables decide the path to python executable. Adding the explicit paths to python.exe (from python3 folder) solved the issue.
In the end, it turned out a WinPython issue (I had to register the python3 installation from WinPython Control panel - changing the PATH environmental variable just won't do).
Now I am back to the original problem in my first post! :)
The administrator has disabled public write access.

Error compiling trunk with python3 5 years 8 months ago #33199

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
Could you try adding a print in utils/message.py line 259 of the input of sp.call (the argument exe).
To see what he is trying to run.

I an running it with python 3.5 I have not tried with a more recent version.
There are 10 types of people in the world: those who understand binary, and those who don't.
The administrator has disabled public write access.

Error compiling trunk with python3 5 years 8 months ago #33201

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
I tried, but print statements don't print! :)
However, after some googling I run into this post and hence changed line 259 with this one:
code.value = sp.call(exe.decode('utf-8'), shell=False)
and compilation begin to run until it halted later on. I think you will get a better idea about the problem and where to look. I will post the whole compilation output in a moment.
The administrator has disabled public write access.

Error compiling trunk with python3 5 years 8 months ago #33203

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
OK, here is the full compilation output listing:

File Attachment:

File Name: compile_output_trunk_gfmsmpi.txt
File Size: 335 KB

It appears that some of the compilation completes and the error appears on a second stage.
I hope you can get a clue from this.
Costas
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: borisb

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