Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__Singleton instance has no attribute... #13

Open
josauder opened this issue Sep 29, 2015 · 1 comment
Open

__Singleton instance has no attribute... #13

josauder opened this issue Sep 29, 2015 · 1 comment

Comments

@josauder
Copy link
Owner

I'm getting an error during "Generate 3D Data" command -

__Singleton instance has no attribute 'floorheight_min'

from building_generation/Main.py, line 65 or so...

floorheight=np.random.uniform(singleton.floorheight_min,singleton.floorheight_max)

I thought maybe the 'np' was the problem, but I removed it and still got an error.

The building configuration file looks fine:


building_generation.conf: {"roofheight_min": 0.03, "scalefactor_min_house": 0.4, "floorheight_min": 0.03, "prob_ledge": 0.5, "diffuse_iterations": 72, "windowheight_max_not_house": 0, "house_height": 0.15, "windowdist_max_not_house": 0.03, "diffuse_power": 1.8, "floorheight_max": 0.04, "scalefactor_max_not_house": 0.95, "windowheight_min": 0.015, "offset": 0.03, "ledgefactor_min": 1.01, "windowdist_min_house": 0.01, "windowwidth_min": 0.013, "scalefactor_max_house": 0.7, "scalefactor_min_not_house": 0.7, "ledgefactor_max": 1.05, "windowwidth_max": 0.025, "windowdist_min_not_house": 0, "windowdist_max_house": 0.03, "windowheight_max_house": 0.027, "roofheight_max": 0.07}

Command line I'm using to run:


python2.7 GUI.py

Ubuntu 14.04, all patches applied.

Full Traceback:


Traceback (most recent call last): File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1489, in call return self.func(*args) File "GUI.py", line 65, in call main(["",self.modulename,"run"]) File "/home/joecamel/rst/download/Blender/proceduralcity_generation/UI.py", line 76, in main eval(args[1])() File "/home/joecamel/rst/download/Blender/procedural_city_generation/UI.py", line 21, in building_generation building_generation_main.main(polygons) File "/home/joecamel/rst/download/Blender/procedural_city_generation/procedural_city_generation/building_generation/main.py", line 65, in main floorheight=random.uniform(singleton.floorheight_min,singleton.floorheight_max) File "/home/joecamel/rst/download/Blender/procedural_city_generation/procedural_city_generation/additional_stuff/Singleton.py", line 37, in __getattr_ return getattr(self.instance,name) AttributeError: __Singleton instance has no attribute 'floorheight_min'

-"WhatISaidB4" at reddit

josauder: An instance of singleton is not killed when the program fails- perhaps I should move the kill call from the actual steps to the UI

@HolySmokesBatman
Copy link

Hello,

Upon further investigation, I found that commenting out the line:

    plt.show()

from polygons/main.py

fixed that particular problem. The image was being displayed properly in a separate window, but the program never seemed to return from that call correctly.

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

No branches or pull requests

2 participants