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

Library conflict and missing file in linux dev package #83

@Drakker

Description

@Drakker

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions