question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Timeout exceeded?

See original GitHub issue

Hi,

I am trying to use ANSYS via Python as follows:

ansys = pyansys.Mapdl(run_location=path,override=True, start_timeout=30, loglevel='INFO')

I am able to launch the GUI and hit “Run” with the specific working directory and ANSYS seems to correctly connect. But I don’t get any response in the Python terminal and it eventually hangs up i.e. it gets stuck on that line of code and never proceeds. Any ideas why? I am using Python 3.6.1 and ANSYS 16.2.

Traceback (most recent call last):
  File "/XXX/.local/lib64/python3.6/site-packages/pyansys/mapdl.py", line 542, in _open_process
    index = self.process.expect(['BEGIN:', 'CONTINUE'], timeout=timeout)
  File "/XXX/apps/python/3.6.1/x86_64/lib64/python3.6/site-packages/pexpect/spawnbase.py", line 321, in expect
    timeout, searchwindowsize, async)
  File "/XXX/apps/python/3.6.1/x86_64/lib64/python3.6/site-packages/pexpect/spawnbase.py", line 345, in expect_list
    return exp.expect_loop(timeout)
  File "/XXX/apps/python/3.6.1/x86_64/lib64/python3.6/site-packages/pexpect/expect.py", line 107, in expect_loop
    return self.timeout(e)
  File "/XXX/apps/python/3.6.1/x86_64/lib64/python3.6/site-packages/pexpect/expect.py", line 70, in timeout
    raise TIMEOUT(msg)
pexpect.exceptions.TIMEOUT: Timeout exceeded.
<pexpect.pty_spawn.spawn object at 0x2b3efa61b2e8>
command: /XXX/apps/ansys/v195/ansys/bin/launcher195
args: [/XXX/apps/ansys/v195/ansys/bin/launcher195', '-j', 'file', '-np', '2']
buffer (last 100 chars): b''
before (last 100 chars): b''
after: <class 'pexpect.exceptions.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 8879
child_fd: 6
closed: False
timeout: 30
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: None
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
    0: re.compile("b'BEGIN:'")
    1: re.compile("b'CONTINUE'")

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "XXX/main.py", line 200, in <module>
    kwag_['objective'] = Optitemp(random_seed=random_seed_)
  File "/XXX/experiments/test_functions/binary_categorical_debugging.py", line 31, in __init__
    self.ansys = pyansys.Mapdl(run_location=path,override=True, start_timeout=30, loglevel='INFO')
  File "/XXX/.local/lib64/python3.6/site-packages/pyansys/mapdl.py", line 480, in __init__
    self._open(additional_switches)
  File "/XXX/.local/lib64/python3.6/site-packages/pyansys/mapdl.py", line 492, in _open
    self._open_process(self.nproc, self.start_timeout, additional_switches)
  File "/XXX/.local/lib64/python3.6/site-packages/pyansys/mapdl.py", line 544, in _open_process
    raise Exception(self.process.before.decode('utf-8'))
Exception

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
akaszynskicommented, Mar 20, 2020

If you feel this solved the problem please close the issue. I’m sorry that MATLAB’s not working, but I recommend transitioning over to Python. These days, the number of modules out there for Python is quite astounding, and it transitions much better from academia to industry (if that’s where you’re coming from).

1reaction
akaszynskicommented, Mar 19, 2020

Try running with prefer_pexpect=False when creating the instance of Mapdl.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Timeout exceeded for HTTPS POST?
The system API that is being used is experiencing "timeout exceeded" errors when connecting to a SugarCRM REST API using HTTPS. The errors...
Read more >
Mule - HTTP Post - Timeout Exceeded - Stack Overflow
The default timeout of http outbound request is 30 seconds specified in ms in mule. Increase timeout of http-request config to greater than ......
Read more >
Solved: How to avoid the 'timeout exceeded' error when usi...
Hi,. When using esri javascript api loading the basemap, errors appear indicating a timeout on the arcgis tile server with dev console open....
Read more >
ConnectionError: timeout exceeded when trying to connect, at ...
Hi, I would be so grateful if someone can help me into below concern: We started getting frequently below timeout error after upgrading...
Read more >
Email Bounce: Retry Timeout Exceeded | InMotion Hosting
Learn about the causes to the common email error: retry timeout exceeded. You will then see common solutions that may help to quickly ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found