Traumflug / Teacup_Firmware

Firmware for RepRap and other 3D printers
http://forums.reprap.org/read.php?147
GNU General Public License v2.0
312 stars 199 forks source link

Cannot launch Configtool.py #277

Closed hauskagoagent closed 7 years ago

hauskagoagent commented 7 years ago

Hey guys, I tried to launch the configtool with python (i definitely did installed python, wxPython, and Arduino), but I got some error messages as shown below:

$ python configtool.py Traceback (most recent call last): File "configtool.py", line 27, in from configtool.settings import Settings File "C:\Users\hauska\Documents\git\Dwarf_Firmware\configtool\settings.py", line 96 print "Unknown %s option: %s - ignoring." % (self.section, opt) ^ SyntaxError: invalid syntax

what should I do with this? btw, my environment is Win 10.

williamchenghu commented 7 years ago

---PROBLEM UPDATE---

same error message shows up under Mac environment as well. Besides that, I tried different version of Python (2.7.13 and 3.6.2), there's a warning message along with Python version detect under configtool.py. However the message is trying to notify people there's not a compatible version of wxPython for Python3, which is not true. wxPython 4.0.0b1 has different versions for python 2.7, 3.4, 3.5, 3.6 (ref. https://pypi.python.org/pypi/wxPython). So i hacked the version detection to be >=4. That's where those error messages i pasted came in, however they seems having problem with default settings read (obviously there's no previous settings since I just download the code and try to launch configtool, didn't use that before or saved any settings).

Wurstnase commented 7 years ago

Configtool itself is for Python 2.7. Python3 has in a lot of cases a different syntax.

E.g. Python 2.7 print „something“ Python 3 print(„something“) Cheng Hu notifications@github.com schrieb am So. 10. Sep. 2017 um 09:42:

---PROBLEM UPDATE---

same error message shows up under Mac environment as well. Besides that, I tried different version of Python (2.7.13 and 3.6.2), there's a warning message along with Python version detect under configtool.py. However the message is trying to notify people there's not a compatible version of wxPython for Python3, which is not true. wxPython 4.0.0b1 has dofferent versions for python 2.7, 3.4, 3.5, 3.6 (ref. https://pypi.python.org/pypi/wxPython). So i hacked the version detection to be >=4. That's where those error messages i pasted came in, however they seems having problem with default settings.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Traumflug/Teacup_Firmware/issues/277#issuecomment-328325735, or mute the thread https://github.com/notifications/unsubscribe-auth/AITlJyS0XKR-MZbRwkXyTDBJMTvdJIONks5sg5LsgaJpZM4PSHld .

hauskagoagent commented 7 years ago

hey @Wurstnase , thanks for your reply. Now I cleaned up 3 and re-installed 2.7, however new error messages show up:

C:\Users\hauska\Documents\git\Dwarf_Firmware>python configtool.py Traceback (most recent call last): File "configtool.py", line 185, in StartGui(getSettings()) File "C:\Users\hauska\Documents\git\Dwarf_Firmware\configtool\gui.py", line 615, in StartGui frame = ConfigFrame(settings) File "C:\Users\hauska\Documents\git\Dwarf_Firmware\configtool\gui.py", line 72, in init self.pgPrinter = PrinterPanel(self, self.nb, self.settings) File "C:\Users\hauska\Documents\git\Dwarf_Firmware\configtool\printerpanel.py", line 47, in init self.pgMech = self.registerPage(MechanicalPage, "Mechanical") File "C:\Users\hauska\Documents\git\Dwarf_Firmware\configtool\printerpanel.py", line 59, in registerPage font = self.settings.font, **kwargs) File "C:\Users\hauska\Documents\git\Dwarf_Firmware\configtool\mechanicalpage.py", line 50, in init sz.AddSpacer((10, 10), pos = (0, 0)) TypeError: Sizer.AddSpacer(): argument 1 has unexpected type 'tuple'

have any ideas?

Wurstnase commented 7 years ago

Don’t install wx with pip.

https://github.com/Traumflug/Teacup_Firmware/issues/276 hauskagoagent notifications@github.com schrieb am So. 10. Sep. 2017 um 11:37:

hey @Wurstnase https://github.com/wurstnase , thanks for your reply. Now I cleaned up 3 and re-installed 2.7, however new error messages show up:

C:\Users\hauska\Documents\git\Dwarf_Firmware>python configtool.py

Traceback (most recent call last):

File "configtool.py", line 185, in StartGui(getSettings()) File "C:\Users\hauska\Documents\git\Dwarf_Firmware\configtool\gui.py", line 615, in StartGui frame = ConfigFrame(settings) File "C:\Users\hauska\Documents\git\Dwarf_Firmware\configtool\gui.py", line 72, in init self.pgPrinter = PrinterPanel(self, self.nb, self.settings) File "C:\Users\hauska\Documents\git\Dwarf_Firmware\configtool\printerpanel.py", line 47, in init self.pgMech = self.registerPage(MechanicalPage, "Mechanical") File "C:\Users\hauska\Documents\git\Dwarf_Firmware\configtool\printerpanel.py", line 59, in registerPage font = self.settings.font, *kwargs) File "C:\Users\hauska\Documents\git\Dwarf_Firmware\configtool\mechanicalpage.py", line 50, in init* sz.AddSpacer((10, 10), pos = (0, 0)) TypeError: Sizer.AddSpacer(): argument 1 has unexpected type 'tuple'

have any ideas?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/Traumflug/Teacup_Firmware/issues/277#issuecomment-328331222, or mute the thread https://github.com/notifications/unsubscribe-auth/AITlJ3RelPE_hUbh4eRYe9NbB-vZGqhuks5sg63hgaJpZM4PSHld .

hauskagoagent commented 7 years ago

@Wurstnase thanks a lot, as soon as i installed pre-compiled package, it works. (i did install x64 pack but throws error, x32 wxPython pack works as a charm.)