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

Dashboard fails to start using Python 3 #368

Closed
tomason opened this issue May 31, 2019 · 0 comments · Fixed by esphome/esphome#596
Closed

Dashboard fails to start using Python 3 #368

tomason opened this issue May 31, 2019 · 0 comments · Fixed by esphome/esphome#596

Comments

@tomason
Copy link

tomason commented May 31, 2019

Operating environment/Installation (Hass.io/Docker/pip/etc.):

Fedora 29 armv7 (Banana Pi)
Python 3.7

ESP (ESP32/ESP8266, Board/Sonoff):

Not applicable

Affected component:

ESPHome dashboard

Description of problem:
The dashboard fails to start in 1.13 running on Python 3. It used to work with 1.12. The issue is easy to fix, there is a missing method in Python 3 (see bellow).

Problem-relevant YAML-configuration entries:
Not applicable

Traceback (if applicable):

Traceback (most recent call last):
  File "/home/esphome/.local/bin/esphome", line 11, in <module>
    sys.exit(main())
  File "/home/esphome/.local/lib/python3.7/site-packages/esphome/__main__.py", line 483, in main
    return run_esphome(sys.argv)
  File "/home/esphome/.local/lib/python3.7/site-packages/esphome/__main__.py", line 459, in run_esphome
    return PRE_CONFIG_ACTIONS[args.command](args)
  File "/home/esphome/.local/lib/python3.7/site-packages/esphome/__main__.py", line 348, in command_dashboard
    from esphome.dashboard import dashboard
  File "/home/esphome/.local/lib/python3.7/site-packages/esphome/dashboard/dashboard.py", line 189, in <module>
    class EsphomeCommandWebSocket(tornado.websocket.WebSocketHandler):
  File "/home/esphome/.local/lib/python3.7/site-packages/esphome/dashboard/dashboard.py", line 172, in websocket_class
    for _, method in cls.__dict__.iteritems():
AttributeError: 'mappingproxy' object has no attribute 'iteritems'

Additional information and things you've tried:
Replace line 172 in file esphome/dashboard/dashboard.py to say for _, method in cls.__dict__.items():

OttoWinter added a commit to esphome/esphome that referenced this issue Jun 1, 2019
OttoWinter added a commit to esphome/esphome that referenced this issue Jun 1, 2019
OttoWinter added a commit to esphome/esphome that referenced this issue Jun 1, 2019
@esphome esphome locked and limited conversation to collaborators Jun 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant