Skip to content

Issues while converting

Thibault Pradal edited this page Aug 13, 2021 · 2 revisions

Here is a list of issues encountered while converting the entirety of the OpenAlea folder folder to Python 3.6.7 and PyQt 5.15.4 :

We applied a 2to3 filter to automatically find and update most of the outdated Python 2 content to Python 3. The changes where done in order to make the visualea command work in shell, but the work was not finished.

Resolved issues :

  • Most of the ImportError with the import smth you may encounter will be solved if you change it to : from openalea.[package] import smth.

  • Some signal uses the old version of connect : self.connect(self.package, SIGNAL(trigger), self.action). In those cases you need to change it : self.package.trigger.connect(self.action). It normally should work.

  • Some packages are not included in the base distribution and will need to be added to the base setup. This is the case for qtconsole and with some configurations ipython may be needed.

  • You may also get a C++ error Segmentation fault (Core Dump). In this case you may need to run ipython then :

%gui qt
%run visualeagui

You will need replace the visualeagui file with the file you need to test, and it will give the detailed error message, instead of just giving you a Core dumped error. Be careful though : if the file you need to run launch at any moment a Ipython process, this will not work.

Unresolved issues :

  • In the grapheditor/src/openalea/grapheditor/qtgraphview.py file, line 802 to 809, you will see a comment with the description of an error. It is not resolved yet, and you may need to comment it to make OpenAlea work.

  • In visualea/src/openalea/visualea, the file mainwindow.py got one of the connect (l.141/142) that cannot be fixed the normal way. See the comment there for more information.

  • Some ui modules ("ui_name") in visualea/src/openalea/visualea are created by other files and may contain a line with an import [file]_rc. This import works fine until some system file uses the command original import which cannot use the import. We need to change it to from [path] import [file]_rc in the automatic code generator. To fix it temporary, you will need to cd into visualea/src/openalea/visualea and type :

pyrcc5 resources/images.qrc -o images_rc.py
  • The command visualea gives in a Unhandled Python exeption. Aborted (core dumped) at launch, all other issues being commented/resolved with some hack.
Clone this wiki locally