dsf-python: type object is not subscriptable?
-
Hello,
I'm trying to run the example custom_m_codes.py found in the github repo for dsf-python.
However I'm running into this issue so the example is obviously not up to date.
Any idea how to fix it?Traceback (most recent call last): File "custom_m_codes.py", line 11, in <module> from dsf.connections import InterceptConnection, InterceptionMode File "/usr/local/lib/python3.7/dist-packages/dsf/__init__.py", line 10, in <module> from . import commands, connections, http, object_model File "/usr/local/lib/python3.7/dist-packages/dsf/connections/__init__.py", line 47, in <module> from .base_command_connection import BaseCommandConnection File "/usr/local/lib/python3.7/dist-packages/dsf/connections/base_command_connection.py", line 3, in <module> from .base_connection import BaseConnection File "/usr/local/lib/python3.7/dist-packages/dsf/connections/base_connection.py", line 6, in <module> from .init_messages import client_init_messages, server_init_message File "/usr/local/lib/python3.7/dist-packages/dsf/connections/init_messages/__init__.py", line 1, in <module> from . import client_init_messages, server_init_message File "/usr/local/lib/python3.7/dist-packages/dsf/connections/init_messages/client_init_messages.py", line 43, in <module> auto_flush: bool = True): TypeError: 'type' object is not subscriptable
Edit: This also effects DSF_ExecOnMcode_Plugin. Same error.
-
@aleohl One for @chrishamm to check, I think!
Ian
-
@droftarts Not quite, rather one for @Falcounet.
-
The problem is that your are using an old version of Python.
I know 3.7 is the latest version available on Debian Buster on which the DuetPi image is based on ...
I will see if I can change the code of dsf-python to stay compatible with the 3.7 version of Python. -
@aleohl I released a new version which fixes that issues so dsf-python still works with Python 3.7
Please let me know if you run it others problems. -
@Falcounet Seems to be working! Thanks for fixing it.
-
-