Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Library conflict and missing file in linux dev package #83

Open
Drakker opened this issue May 12, 2016 · 1 comment
Open

Library conflict and missing file in linux dev package #83

Drakker opened this issue May 12, 2016 · 1 comment

Comments

@Drakker
Copy link

Drakker commented May 12, 2016

Hi,

I already wrote an how to on working around these problems, I posted it on the Google Group: https://groups.google.com/forum/?hl=en#!topic/circuitscape/kHIcqX8FfYo

I'm also posting it here as prof. McRae suggested.

The problem occurs on Linux, on Ubuntu versions 14.04 to 15.10, but I also had the same problem running it on a CentOS cluster.

The first problem is that other system packages (notably the GZip wrappers for python) also use a library named "io". The fix is very simple, I renamed the "io.py" file in /circuitscape to "cs_io.py" and changed the import lines in "compute.py" and "compute_base.py".

The second problem is a bit more insidious and affect the GUI. It is an error returned by PythonCards:

~/circuitscape$ python circuitscape/gui.py
Traceback (most recent call last):
File "circuitscape/gui.py", line 856, in
show_gui()
File "circuitscape/gui.py", line 850, in show_gui
app = model.Application(GUI, rsrc=GUI_RSRC)
File "/usr/lib/python2.7/dist-packages/PythonCard/model.py", line 393, in init
wx.App.init(self, 0)
File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py", line 8628, in init
self._BootstrapApp()
File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py", line 8196, in _BootstrapApp
return core.PyApp__BootstrapApp(_args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/PythonCard/model.py", line 445, in OnInit
self._initBackgrounds(self.resource)
File "/usr/lib/python2.7/dist-packages/PythonCard/model.py", line 438, in _initBackgrounds
bg = self.frameClass(None, bgRsrc)
File "/usr/lib/python2.7/dist-packages/PythonCard/model.py", line 685, in init
self._initLayout(aBgRsrc.components)
File "/usr/lib/python2.7/dist-packages/PythonCard/model.py", line 999, in _initLayout
self.components[rsrc.name] = rsrc
File "/usr/lib/python2.7/dist-packages/PythonCard/model.py", line 98, in setitem
control = component.ComponentFactory().createComponent(self.parent, self.parent.panel, item)
File "/usr/lib/python2.7/dist-packages/PythonCard/component.py", line 347, in createComponent
component = clazz(aParent, aResource)
File "/usr/lib/python2.7/dist-packages/PythonCard/components/image.py", line 70, in init
widget.Widget.init( self, aParent, aResource )
File "/usr/lib/python2.7/dist-packages/PythonCard/widget.py", line 68, in init
self._setBackgroundColor(self._resource.backgroundColor)
File "/usr/lib/python2.7/dist-packages/PythonCard/components/image.py", line 135, in _setBackgroundColor
bmp = self._bitmap.getBits()
AttributeError: 'Bitmap' object has no attribute 'getBits'

It seems to be related to the missing "cs_logo.jpg" file (did a find in the circuitscape folder and couldn't find it, didn't investigate any further). As I wrote in the groups, I know I fixed it a different way in the past, but I can't remember what it was and I was in a hurry to get Circuitscape to run today and ended up modifying the PythonCards library, which is a big no-no, but allowed me to launch my computations without having to create a config file from scratch.

Both these bugs have been reported in the past in the group but it seems they were never submitted here.

@lionel68
Copy link

lionel68 commented Jun 9, 2017

The fix you mentioned in the googlegroups (messing up PythonCards) worked for me (Ubuntu 16.04). It is however a rather lengthy process to get Circuitscape to run using python ...

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

No branches or pull requests

2 participants