Pythonista-Issues
Pythonista-Issues copied to clipboard
Supplied Yaml not compatible with Python 3.10
python 3.10.4 Pythonista 3.4 Site-package Yaml is 3.11
AttributeError: module 'collections' has no attribute 'Hashable'
Solution #1: upgrade YAML, see https://github.com/yaml/pyyaml/commit/9959328b41ee577c6f14e3a0184b07dd0ecadb8c
alternative solution: copy the yaml directory from site-packages (built-in) into site-packages and manually edit the constructor.py file by importing Hashable from collections.abc instead of collections
(to copy the directory either use cp after installing stash, or write a Python script to do it; absolute location of the yaml directory is shown in the error Traceback)
You must have an old version of StaSH.
# Python 3.10 has put Hashable in collections.abc instead of collections
import collections
collections.Hashable = collections.abc.Hashable
ywangd/stash#462
StaSh v0.7.5 on python 3.10.4
btw, what’s the relationship with stash? I am talking about yaml and Python there…
Please provide the yaml that you are trying to use so that we can reproduce your results.