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

TypeError: 'str' object does not support item assignment #5

Open
markojak opened this issue Sep 20, 2022 · 0 comments
Open

TypeError: 'str' object does not support item assignment #5

markojak opened this issue Sep 20, 2022 · 0 comments

Comments

@markojak
Copy link

markojak commented Sep 20, 2022

This is epic, can't wait to enter the LoomSpace!

I'm experiencing an error where any keyboard input throws a str item assignment error - I suspect this is related to the string being immutable and needing to convert the string into a list.

Can you help me do a workaround for this?

Current Environment:

  • M1 MacOS AArch64
  • Python 3.8.11 (pyenv)
  • Had to remove Tokenizers and install manually as the version doesn't compiled with Rust on Arm64 (I'll do a PR for this separately for other Mac Users)

Full error:

Traceback (most recent call last):
  File "/opt/homebrew/anaconda3/lib/python3.9/tkinter/__init__.py", line 1892, in __call__
    return self.func(*args)
  File "/Users/chiron/workspace/10Weaver/loom/components/modules.py", line 1206, in submit
    self.callbacks["Submit"]["callback"](text=modified_text, auto_response=self.settings().get("auto_response", True))
  File "/Users/chiron/workspace/10Weaver/loom/controller.py", line 49, in <lambda>
    return lambda event=None, *args, _f=f, **kwargs: _f(*args, **kwargs)
  File "/Users/chiron/workspace/10Weaver/loom/util/util.py", line 355, in f
    return func(*args, **kwargs)
  File "/Users/chiron/workspace/10Weaver/loom/controller.py", line 2004, in submit
    new_child = self.create_child(toggle_edit=False)
  File "/Users/chiron/workspace/10Weaver/loom/util/util.py", line 355, in f
    return func(*args, **kwargs)
  File "/Users/chiron/workspace/10Weaver/loom/controller.py", line 563, in create_child
    new_child = self.state.create_child(parent=node)
  File "/Users/chiron/workspace/10Weaver/loom/model.py", line 815, in create_child
    self.rebuild_tree()
  File "/Users/chiron/workspace/10Weaver/loom/model.py", line 36, in wrapper
    output = func(self, *args, **kwargs)
  File "/Users/chiron/workspace/10Weaver/loom/model.py", line 477, in rebuild_tree
    self.tree_node_dict = {d["id"]: d for d in flatten_tree(self.tree_raw_data["root"])}
  File "/Users/chiron/workspace/10Weaver/loom/util/util_tree.py", line 314, in flatten_tree
    child["parent_id"] = d["id"]
TypeError: 'str' object does not support item assignment
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

1 participant