-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
invisible prompt in interactive mode #5
Comments
So are you using a python prompt when you get this problem? |
Thanks for the prompt answer. I have just tried it out. Unfortunately it does not solve the problem. The end use is for scripting anyway, so it is not critical. But of course, ipython speeds up the development process considerably... |
Hi Mahe - thanks for trying this out and for reporting your difficulties! What OS are you working on? You mentioned that you get errors emitted to On Fri, Mar 1, 2013 at 10:43 AM, Mahé Perrette notifications@github.comwrote:
|
Hi Arokem, thanks for your answer. I am using Ubuntu 12.04. The terminal is from Xfce (XUbuntu). I have just checked the bug occurs with GNOME Terminal, too. Maybe something to do with log files / redirection of sys.stdout/in? On a real use situation I have a more serious bug though. I print below the terminal output, maybe you have an idea what could be happening. It seems to be happening at the time of returning the output. By the way, the matlab function I call returns a structure. I am not sure how the structures are handled in pymatbridge - if at all. Anyway, here is the log (is there any better way with github to upload log files?): """
""" [etc.... everything going well so far...then it goes on with prints out, until] """ timeout Traceback (most recent call last) /home/perrette/Projects/SLR_Regional/gitSource/execute_from_python.py in () /home/perrette/Projects/SLR_Regional/gitSource/execute_from_python.py in getit(path2func, argdict) /usr/local/lib/python2.7/site-packages/pymatbridge/pymatbridge.pyc in run_func(self, func_path, func_args, maxtime) /usr/local/lib/python2.7/site-packages/pymatbridge/pymatbridge.pyc in _open_page(self, page_name, arguments, timeout) /usr/lib/python2.7/urllib2.pyc in urlopen(url, data, timeout) /usr/lib/python2.7/urllib2.pyc in open(self, fullurl, data, timeout) /usr/lib/python2.7/urllib2.pyc in _open(self, req, data) /usr/lib/python2.7/urllib2.pyc in _call_chain(self, chain, kind, meth_name, _args) /usr/lib/python2.7/urllib2.pyc in http_open(self, req) /usr/lib/python2.7/urllib2.pyc in do_open(self, http_class, req) /usr/lib/python2.7/httplib.pyc in getresponse(self, buffering) /usr/lib/python2.7/httplib.pyc in begin(self) /usr/lib/python2.7/httplib.pyc in _read_status(self) /usr/lib/python2.7/socket.pyc in readline(self, size) timeout: timed out That's it...Or can the structure simply not be returned? EDIT: the structure is quite large, maybe it has something to do with that EDIT2: I have tried with a smaller structure, the output is fine, pymatbridge closes correctly. Maybe you have an idea which python / pymatbridge settings to change to avoid the error with large structures? The returned output, if saved to a matlab .mat file, is 104 Mb ... Many thanks again. |
Sorry, I did not answer your question on the printout bug. I meant I can see the error messages (and more generally the outputs) where there are some, but no error message specifically associated with the absence of prompt. For example, after executing the function in my example below, typing: "enter" then "2+2" , "2+3" then "ii", only the outputs and errors are shown, not the inputs: In [9]: In [11]: Out[11]: 5 In [12]: --------------------------------------------------------------------------- NameError: name 'ii' is not defined In [13]: EDIT: if pymatbridge executes matlab without errors and closes, there is not such bug. To handöe errors, I have tried with a try / except statement to always execute mlab.close(), but this fails (matlab seems to be closed anyway in case of errors), and the prompt bug remains. |
Just to be sure - did you try to run the example ipython notebooks that are As for your use-case: one possibility is that the computation simply takes You can set the matlab = pymatbridge.Matlab(maxtime=100) As for the Matlab struct - to be honest, I am not sure what will happen On Sat, Mar 2, 2013 at 5:10 AM, Mahé Perrette notifications@github.comwrote:
|
Hi, first of all many thanks for sharing this project, a really great idea, especially useful when trying to switch from matlab to python but still having many old routines in matlab.
I just had a go, everything went smoothly until I entered mlab.start()
Then I cannot see my input commands any more (nothing that I type appear at the screen, just the error messages). Even after I quit (i)python, the terminal remains unusable.
The test.py example runs smoothly though. Any idea where that could come from?
The text was updated successfully, but these errors were encountered: