Skip to content
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

Problem with any in Ganga shell #1831

Closed
mesmith75 opened this issue Dec 30, 2020 · 1 comment · Fixed by #1832
Closed

Problem with any in Ganga shell #1831

mesmith75 opened this issue Dec 30, 2020 · 1 comment · Fixed by #1832

Comments

@mesmith75
Copy link
Contributor

There seems to be a problem with the IPython shell:

[20:41:15]                                                                                                                                                                  
Ganga In [2]: stat                                                                                                                                                          
Ganga Out [2]: 'completed'

[20:41:21]                                                                                                                                                                  
Ganga In [3]: any(stat == x for x in ["completed", "failed"])                                                                                                               
ERROR    !!Unknown/Unexpected ERROR!!
ERROR    If you're able to reproduce this please report this to the Ganga developers!
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
~/cmtuser/GANGA/GANGA_HEAD/install/ganga/ganga/GangaCore/GPI/__init__.py in <module>
----> 1 any(stat == x for x in ["completed", "failed"])

~/cmtuser/GANGA/GANGA_HEAD/install/ganga/ganga/GangaCore/GPI/__init__.py in <genexpr>(.0)
----> 1 any(stat == x for x in ["completed", "failed"])

NameError: name 'stat' is not defined

In a stand-alone IPython shell this is fine:

In [1]: stat = "completed"

In [2]: any(stat == x for x in ["completed", "failed"])
Out[2]: True
@mesmith75 mesmith75 changed the title Problem with any Problem with any in Ganga shell Dec 30, 2020
@mesmith75
Copy link
Contributor Author

So this looks like a very old bug in IPython shell embedding: ipython/ipython#136, ipython/ipython#62 .

I am not sure there is much we can do about it without great difficulty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant