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

Python 2.7 GUI Support #57

Closed
MichaMans opened this issue Nov 11, 2015 · 15 comments
Closed

Python 2.7 GUI Support #57

MichaMans opened this issue Nov 11, 2015 · 15 comments
Assignees
Labels
Milestone

Comments

@MichaMans
Copy link
Contributor

I figuered out, that the GUI wont start under Python 2.7
The controller cannot be imported.
I think we can handle this by adding the init.py to the Controller.
Propably there are some more problems we have to fix that are Python 2.7 related (Some other GUI things). Or we don't support it anymore.

@MichaMans MichaMans added this to the v.0.2.0 milestone Nov 11, 2015
@MichaMans MichaMans added GUI and removed Logic labels Nov 11, 2015
@PRemmen
Copy link
Member

PRemmen commented Nov 11, 2015

We should/need to support that, also in the GUI.
@yGoerguelue and @CGingter could you fix that? Is it possible to implement UnitTests also for GUI

@CGingter
Copy link
Contributor

There is no reason why the controller should not have a init.py but teaser behaves really weird in Python 2.7. This looks like a lot of research/work so i would propose to give it to @yGoerguelue because i got only one week left.

@PRemmen
Copy link
Member

PRemmen commented Nov 12, 2015

Please specify what you mean by "behaves really weird"? Because all functions that are implemented in the unit tests (almost all containend in Logic) run in python 2.7 and python 3.4!

@CGingter
Copy link
Contributor

Ok so for example the load building function lets you only select .xml files which is nowhere specified. When you load a building the paint function gets called infinite times and the program gets shut down. That was the only thing i tested so far but it is really strange.

@CGingter
Copy link
Contributor

Oh wait he just starts an older version...which is still weird...let me look into it!

@PRemmen
Copy link
Member

PRemmen commented Nov 12, 2015

Ok so for example the load building function lets you only select .xml files which is nowhere specified. When you load a building the paint function gets called infinite times and the program gets shut down. That was the only thing i tested so far but it is really strange.

I don't understand this. what "paint" function do you mean? And how can I select a .xml file that is nowhere defined? Maybe like a hardcoded path somewhere?
Update:
Ahh understand the .XML problem now, still not thinkng that this is a python 2.7 / 3.4 problem

@CGingter
Copy link
Contributor

That's not what i meant. For some reason if i select the python 2.7 interpreter it uses an old teaser 4 version. In this version you could only select .xml files in the file dialog when you clicked on Load Building and also some newer buttons are missing. The paint function is a PYQT function that draws all the controls and it breaks when trying to fill in the zone lists, but this is of no concern since it is most likely just a bug in this old version.

So the question is why does it load an old version and not the current one?

@PRemmen
Copy link
Member

PRemmen commented Nov 12, 2015

Maybe you need to update you installation of teaser with pip for 2.7

@CGingter
Copy link
Contributor

Got it figured out...well actually i just deleted my workspace and made a new one but hey whatever works...

Still getting some errors, can hopefully solve it today!

@yGoerguelue
Copy link
Contributor

@MichaMans I can start the GUI ordinary under Python 2.7. Maybe you don't have the package(PyQt4) that is needed. Look if you can find the folder PyQt4 in "C:\Python27\Lib\site-packages".

@yGoerguelue
Copy link
Contributor

@PRemmen Strange things are happening, if i start the GUI in branch (issue57...) with python27 and load a Project into it. Everything works, but if I do a double click on the zone element and nothing happens. If I start the GUI in another branch like issue47 or issue41 everything works fine.

@MichaMans
Copy link
Contributor Author

So i looked into the development branch. its not starting with python 2.7. I think a coding decleration would help here (since i get and ASCII error in a commented block). like first line

# -*- coding: utf-8 -*-

But i'm not sure if this will help or if this is a right solution.

@yGoerguelue
Copy link
Contributor

That's the problem with the German language, we can't use german characters like ß,ö,ä, ü. For now we shouldn't use german characters. I will fix it tomorrow and search for an alternative solution.

@CGingter
Copy link
Contributor

CGingter commented Dec 1, 2015

To circumvent the ASCII error you can use the html escaped string instead of the character. You can search in the MainUI class for & # 1 7 6; which is °. ß for example would be & # 2 2 3;. Good luck!

Just write it together and ignore the spaces between & and ; because else this website converts it to the symbol. Whoops!

yGoerguelue pushed a commit that referenced this issue Dec 2, 2015
@yGoerguelue
Copy link
Contributor

To do

  • Language differences and workarounds

yGoerguelue pushed a commit that referenced this issue Dec 9, 2015
yGoerguelue pushed a commit that referenced this issue Dec 14, 2015
fix....), 4804092 (changed layer
position)
@PRemmen PRemmen closed this as completed Dec 21, 2015
PRemmen pushed a commit that referenced this issue May 10, 2016
PRemmen pushed a commit that referenced this issue May 10, 2016
PRemmen pushed a commit that referenced this issue May 10, 2016
PRemmen pushed a commit that referenced this issue May 10, 2016
fix....), 4804092 (changed layer
position)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants