'InteractiveShellEmbed' object has no attribute 'pt_cli'

Asked by Rémi Monthiller on 2019-04-01

Hi everybody,

I am trying to use Yade for my Master 2 project and I am facing an issue when trying to run it.
I compiled from source it did succeed without any error message.

Here is the full output :

Welcome to Yade 2019-03-14.git-8b073f5
TCP python prompt on localhost:9000, auth cookie `aucsky'
XMLRPC info provider on http://localhost:21000
AttributeError Traceback (most recent call last)
/home/rmonthil/Documents/yade/install/bin/yade-2019-03-14.git-8b073f5 in <module>()
    333 import yade.qt
    334 qapp=QApplication(sys.argv)
--> 335 userSession(gui=gui,qapp=qapp)
    337 if __name__ == "__main__":

/home/rmonthil/Documents/yade/install/bin/yade-2019-03-14.git-8b073f5 in userSession(gui, qapp)
    228 registry=None
    229 # depending on version the keybindigs registry sits in different places
--> 230 if getattr(ipshell, 'pt_cli'):
    231 registry = ipshell.pt_cli.application.key_bindings_registry
    232 if getattr(ipshell, 'pt_app', None):

AttributeError: 'InteractiveShellEmbed' object has no attribute 'pt_cli'

Do you have any clue to solve the issue ?

Thanks a lot !

Question information

English Edit question
Yade Edit question
No assignee Edit question
Solved by:
Rémi Monthiller
Last query:
Last reply:
Rémi Monthiller (rmonthil) said : #1

I just changed the line from "if getattr(ipshell, 'pt_cli'):" to "if getattr(ipshell, 'pt_cli', None):" in the trunk/core/main/main.py.in file and it seems to work.

Jérôme Duriez (jduriez) said : #2

Good to hear...

For the record, which operating system do you use ?
(I do not remember this issue has ever been reported)

Rémi Monthiller (rmonthil) said : #3

I am using Linux (ubuntu 16.04 LTS).

Should I report the issue somewhere ?

Janek Kozicki (cosurgi) said : #4

This already has been fixed - hasattr(…) is used instead of getattr(…): https://gitlab.com/yade-dev/trunk/merge_requests/51
compare with file https://gitlab.com/yade-dev/trunk/blob/master/core/main/main.py.in#L235

Which yade version did you git clone ? There is no revision 8b073f5 in master.

Can you re-check if this problem persists with latest master?

Rémi Monthiller (rmonthil) said : #5

It seems that, for my case, it is not working on the latest GitHub master but it is on the latest GitLab master.

Janek Kozicki (cosurgi) said : #6

Yeah, we should add some note on github so that people don't git clone from it anymore. We have moved to gitlab.

Jérôme Duriez (jduriez) said : #7


If you saw something that directed/misled you to github, it would useful for us to know where this thing was.

Rémi Monthiller (rmonthil) said : #8

Actually, I know Yade a little already and I used it one year ago. I just assumed that the GitHub was still up to date. I noticed that commits were done quite recently and didn't noticed that the README had changed (and I didn't see the Warning). I should have read it more carefully.