View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0012725 | ParaView | (No Category) | public | 2011-11-13 13:12 | 2012-02-08 17:24 | ||||
Reporter | Pat Marion | ||||||||
Assigned To | Sebastien Jourdain | ||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | 3.14 | |||||||
Summary | 0012725: Regression in paraview.simple python module | ||||||||
Description | The CreateObject functions are not correctly added to paraview.simple In paraview 3.10: >>> paraview.simple.Sphere <function CreateObject at 0x128bcade8> In parview 3.12: >>> paraview.simple.Sphere Traceback (most recent call last): File "<console>", line 1, in <module> AttributeError: 'module' object has no attribute 'Sphere' This is a regression that I tracked to commit 9f1626b. The commit message says: "Also fixed servermanager.py to create module functions only after a server connection was made." Previously, this statement was executed by simple.py when it was imported: _add_functions(globals()) But commit 9f1626b moves that statement into the Connect() function, which is never called by the GUI, it is only called by pvpython. A 'hack' was added in commit a2e764e which adds c++ code to explicitly execute the statement after paraview.simple is imported, but this is wrong, because the globals() passed to _add_functions() is the globals of the main context, not the globals of paraview.simple. Attached is a patch that fixes the issue, but I don't clearly understand why commit 9f1626b needed to make the change that it did in the first place. It seems that my attached patch is roughly equivalent to reverting the change. | ||||||||
Tags | No tags attached. | ||||||||
Project | TBD | ||||||||
Topic Name | 12725-regression-python-module | ||||||||
Type | incorrect functionality | ||||||||
Attached Files | paraview_simple_fix.patch [^] (1,130 bytes) 2011-11-13 13:12 [Show Content] | ||||||||
Relationships | |
Relationships |
Notes | |
(0027689) Pat Marion (reporter) 2011-11-13 13:14 |
Utkarsh, could you take a look at this bug sometime? Maybe you could ask Sebastien why he did what he did :) |
(0027691) Sebastien Jourdain (manager) 2011-11-15 09:56 |
The reason why I did those changes, it is because the _add_function needed to happen after Connect and not at the import time as the Proxy definition come from the server now which was not the case previously. So your patch seems reasonable in the sense that with the GUI, we are already connected... |
(0027692) Pat Marion (reporter) 2011-11-15 11:31 |
So what happens when the GUI disconnects from the builtin server and connects to a new remote server? Is it possible that the remote server has additional proxy definitions that will not make it into paraview.simple? What if the remote server has fewer proxy definitions? Is the only way to change the number of proxy definitions when there is a plugin loaded? |
(0027693) Sebastien Jourdain (manager) 2011-11-15 12:06 |
When you connect or disconnect from a server and you have a python shell open, that shell get totally reinitialized, therefore the simple get the proper latest proxy definitions. The only runtime update available so far was with plugin loading. Although, I'm working in bringing support for multi-server connection, which exactly means that based on which server is active, the proxy definition available inside simple could be different. For that, I had to add a _remove_function method add clean up some of the previous code. That code already works great inside pvpython but I need to properly integrate it when python is used inside ParaView. |
(0027717) Utkarsh Ayachit (administrator) 2011-11-18 14:54 |
merged to master. |
(0028114) Utkarsh Ayachit (administrator) 2012-02-08 17:24 |
Closing bugs sitting in "customer review" for a long time. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2011-11-13 13:12 | Pat Marion | New Issue | |
2011-11-13 13:12 | Pat Marion | File Added: paraview_simple_fix.patch | |
2011-11-13 13:14 | Pat Marion | Note Added: 0027689 | |
2011-11-15 09:42 | Sebastien Jourdain | Assigned To | => Sebastiennn Jourdain |
2011-11-15 09:42 | Sebastien Jourdain | Status | backlog => todo |
2011-11-15 09:42 | Sebastien Jourdain | Status | todo => active development |
2011-11-15 09:56 | Sebastien Jourdain | Note Added: 0027691 | |
2011-11-15 11:12 | Sebastien Jourdain | Status | active development => gatekeeper review |
2011-11-15 11:12 | Sebastien Jourdain | Resolution | open => fixed |
2011-11-15 11:13 | Sebastien Jourdain | Topic Name | => 12725-regression-python-module |
2011-11-15 11:31 | Pat Marion | Note Added: 0027692 | |
2011-11-15 12:06 | Sebastien Jourdain | Note Added: 0027693 | |
2011-11-18 14:53 | Utkarsh Ayachit | Fixed in Version | => git-master |
2011-11-18 14:54 | Utkarsh Ayachit | Status | gatekeeper review => customer review |
2011-11-18 14:54 | Utkarsh Ayachit | Note Added: 0027717 | |
2012-02-08 17:21 | Utkarsh Ayachit | Fixed in Version | git-master => 3.14 |
2012-02-08 17:24 | Utkarsh Ayachit | Status | customer review => closed |
2012-02-08 17:24 | Utkarsh Ayachit | Note Added: 0028114 |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |