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

Multiple error messages and IDE doesn't open #2

Open
codeezer opened this issue Feb 13, 2020 · 1 comment
Open

Multiple error messages and IDE doesn't open #2

codeezer opened this issue Feb 13, 2020 · 1 comment

Comments

@codeezer
Copy link

codeezer commented Feb 13, 2020

Hello,

First, I had the following error message.

python Beremiz.py
Traceback (most recent call last):
  File "Beremiz.py", line 225, in <module>
    beremiz = BeremizIDELauncher()
  File "Beremiz.py", line 45, in __init__
    self.app_dir = paths.AbsDir(__file__)
  File "/home/ezer/Documents/research/beremiz/beremiz/util/paths.py", line 39, in AbsDir
    file = AbsFile(file)
  File "/home/ezer/Documents/research/beremiz/beremiz/util/paths.py", line 34, in AbsFile
    file = text(file, sys.getfilesystemencoding())
TypeError: decoding str is not supported

I bypassed the line which caused the error. Then, I faced the following error:

`Traceback (most recent call last):
  File "Beremiz.py", line 226, in <module>
    beremiz.Start()
  File "Beremiz.py", line 220, in Start
    self.InstallExceptionHandler()
  File "Beremiz.py", line 183, in InstallExceptionHandler
    import version
  File "/home/ezer/Documents/research/beremiz/beremiz/version.py", line 224, in <module>
    app_version = app_version + "-" + rev.rstrip()
TypeError: must be str, not bytes`

I then converted the rev.rstrip() to the string. Then, there are multiple error messages as follows:

Traceback (most recent call last):
  File "Beremiz.py", line 203, in AppStart
    self.BackgroundInitialization()
  File "Beremiz.py", line 136, in BackgroundInitialization
    self.ImportModules()
  File "Beremiz.py", line 179, in ImportModules
    mod = __import__(modname)
  File "/home/ezer/Documents/research/beremiz/beremiz/BeremizIDE.py", line 44, in <module>
    from editors.EditorPanel import EditorPanel
  File "/home/ezer/Documents/research/beremiz/beremiz/editors/EditorPanel.py", line 29, in <module>
    from controls import VariablePanel
  File "/home/ezer/Documents/research/beremiz/beremiz/controls/__init__.py", line 29, in <module>
    from controls.CustomEditableListBox import CustomEditableListBox
  File "/home/ezer/Documents/research/beremiz/beremiz/controls/CustomEditableListBox.py", line 31, in <module>
    class CustomEditableListBox(wx.gizmos.EditableListBox):
AttributeError: module 'wx.gizmos' has no attribute 'EditableListBox'
Traceback (most recent call last):
  File "Beremiz.py", line 203, in AppStart
    self.BackgroundInitialization()
  File "Beremiz.py", line 136, in BackgroundInitialization
    self.ImportModules()
  File "Beremiz.py", line 179, in ImportModules
    mod = __import__(modname)
  File "/home/ezer/Documents/research/beremiz/beremiz/BeremizIDE.py", line 44, in <module>
    from editors.EditorPanel import EditorPanel
  File "/home/ezer/Documents/research/beremiz/beremiz/editors/EditorPanel.py", line 29, in <module>
    from controls import VariablePanel
  File "/home/ezer/Documents/research/beremiz/beremiz/controls/__init__.py", line 29, in <module>
    from controls.CustomEditableListBox import CustomEditableListBox
  File "/home/ezer/Documents/research/beremiz/beremiz/controls/CustomEditableListBox.py", line 31, in <module>
    class CustomEditableListBox(wx.gizmos.EditableListBox):
AttributeError: module 'wx.gizmos' has no attribute 'EditableListBox'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ezer/.local/lib/python3.6/site-packages/wx/core.py", line 3285, in <lambda>
    lambda event: event.callable(*event.args, **event.kw) )
  File "Beremiz.py", line 211, in AppStart
    self.handle_exception(*sys.exc_info(), exit=True)
  File "/home/ezer/Documents/research/beremiz/beremiz/util/ExceptionHandler.py", line 140, in handle_exception
    save_bug_report(e_type, e_value, e_traceback, bug_report_path, date)
  File "/home/ezer/Documents/research/beremiz/beremiz/util/ExceptionHandler.py", line 115, in save_bug_report
    info['locals'] = format_namespace(exception_locals)
  File "/home/ezer/Documents/research/beremiz/beremiz/util/ExceptionHandler.py", line 90, in format_namespace
    return '\n'.join(['%s%s: %s' % (indent, k, repr(v)[:10000]) for k, v in d.iteritems()])
AttributeError: 'dict' object has no attribute 'iteritems'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/home/ezer/Documents/research/beremiz/beremiz/util/ExceptionHandler.py", line 140, in handle_exception
    save_bug_report(e_type, e_value, e_traceback, bug_report_path, date)
  File "/home/ezer/Documents/research/beremiz/beremiz/util/ExceptionHandler.py", line 115, in save_bug_report
    info['locals'] = format_namespace(exception_locals)
  File "/home/ezer/Documents/research/beremiz/beremiz/util/ExceptionHandler.py", line 90, in format_namespace
    return '\n'.join(['%s%s: %s' % (indent, k, repr(v)[:10000]) for k, v in d.iteritems()])
AttributeError: 'dict' object has no attribute 'iteritems'

Original exception was:
Traceback (most recent call last):
  File "Beremiz.py", line 203, in AppStart
    self.BackgroundInitialization()
  File "Beremiz.py", line 136, in BackgroundInitialization
    self.ImportModules()
  File "Beremiz.py", line 179, in ImportModules
    mod = __import__(modname)
  File "/home/ezer/Documents/research/beremiz/beremiz/BeremizIDE.py", line 44, in <module>
    from editors.EditorPanel import EditorPanel
  File "/home/ezer/Documents/research/beremiz/beremiz/editors/EditorPanel.py", line 29, in <module>
    from controls import VariablePanel
  File "/home/ezer/Documents/research/beremiz/beremiz/controls/__init__.py", line 29, in <module>
    from controls.CustomEditableListBox import CustomEditableListBox
  File "/home/ezer/Documents/research/beremiz/beremiz/controls/CustomEditableListBox.py", line 31, in <module>
    class CustomEditableListBox(wx.gizmos.EditableListBox):
AttributeError: module 'wx.gizmos' has no attribute 'EditableListBox'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ezer/.local/lib/python3.6/site-packages/wx/core.py", line 3285, in <lambda>
    lambda event: event.callable(*event.args, **event.kw) )
  File "Beremiz.py", line 211, in AppStart
    self.handle_exception(*sys.exc_info(), exit=True)
  File "/home/ezer/Documents/research/beremiz/beremiz/util/ExceptionHandler.py", line 140, in handle_exception
    save_bug_report(e_type, e_value, e_traceback, bug_report_path, date)
  File "/home/ezer/Documents/research/beremiz/beremiz/util/ExceptionHandler.py", line 115, in save_bug_report
    info['locals'] = format_namespace(exception_locals)
  File "/home/ezer/Documents/research/beremiz/beremiz/util/ExceptionHandler.py", line 90, in format_namespace
    return '\n'.join(['%s%s: %s' % (indent, k, repr(v)[:10000]) for k, v in d.iteritems()])
AttributeError: 'dict' object has no attribute 'iteritems'

Am I missing something?

@ALTracer
Copy link

@codeezer Looks like you were trying to run (this old version of) Beremiz with python3.6 and wxPython 4.0 "Phoenix" which was not supported back then in 2017. You have a couple options:

  1. Install python2 and wxPython 2.8 (apt-get install python-wxgtk2.8) from at least Ubuntu 14.04 Trusty
    (Ubuntu 16.04 Xenial has only python-wxgtk3.0, 18.04 Bionic has python-wxgtk4.0 and python3-wxgtk4.0)
    See https://openplc.discussion.community/post/openplc-editor-install-fail-10199441
  2. Write a Docker image FROM ubuntu:trusty to keep your current system sane (20.04 Focal?)
  3. Use upstream Beremiz from https://bitbucket.org/automforge/beremiz

As YAPLC/IDE is an extension to Beremiz, it might break due to upstream internal API changes.

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