RasterFairy icon indicating copy to clipboard operation
RasterFairy copied to clipboard

AttributeError: module 'rasterfairy' has no attribute 'getRectArrangements'

Open communikein opened this issue 8 years ago • 3 comments

I tried one of your examples, the first one to be precise (Raster Fairy - Random Swap Optimization Demo.ipynb), and it all works fine until I get to the command arrangements = rasterfairy.getRectArrangements(totalDataPoints). When python tries to execute this line it stops with the error: AttributeError: module 'rasterfairy' has no attribute 'getRectArrangements'

I have no clue why, but it seems that it can't see any of the functions defined in the class.

communikein avatar Oct 25 '17 12:10 communikein

That is strange since as you can see in the rasterfairy/rasterfairy.py code there is a method with that name. Sounds like some import issue to me. Are you using Python 2 or 3?

Quasimondo avatar Oct 25 '17 12:10 Quasimondo

I'm using python 3.6. I've just seen that rasterfairy works only with python 2 :/ Any chance to make it work with python 3 too?

EDIT. Tried with python 2.7, it works now. My problem is that I need to work with Python 3.6, any chance to port this module to it?

communikein avatar Oct 25 '17 13:10 communikein

Ok, looks like it is enough to follow the edits made by @bmcfee in his pull request to make it python3 compatible (https://github.com/Quasimondo/RasterFairy/pull/8)

communikein avatar Oct 25 '17 17:10 communikein