shap-e icon indicating copy to clipboard operation
shap-e copied to clipboard

Error on executing script from `sample_text_to_3d.ipynb`

Open kashyap2108 opened this issue 2 years ago • 5 comments

xm = load_model('transmitter', device=device)

Getting TypeError: 'type' object is not subscriptable

Traces Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/kashyap/Desktop/altworld/shap-e/shap_e/models/download.py", line 144, in load_model from .configs import model_from_config File "/Users/kashyap/Desktop/altworld/shap-e/shap_e/models/configs.py", line 20, in <module> from shap_e.models.nerstf.mlp import MLPDensitySDFModel, MLPNeRSTFModel File "/Users/kashyap/Desktop/altworld/shap-e/shap_e/models/nerstf/mlp.py", line 7, in <module> from shap_e.models.stf.mlp import MLPModel File "/Users/kashyap/Desktop/altworld/shap-e/shap_e/models/stf/mlp.py", line 14, in <module> from .base import Model File "/Users/kashyap/Desktop/altworld/shap-e/shap_e/models/stf/base.py", line 11, in <module> class Model(ABC): File "/Users/kashyap/Desktop/altworld/shap-e/shap_e/models/stf/base.py", line 18, in Model ) -> AttrDict[str, Any]:

Executing on Apple M1 Pro

kashyap2108 avatar May 08 '23 08:05 kashyap2108

@kashyap2108 you could try removing the [str, Any] from shap_e/models/stf/base.py line 18: https://github.com/openai/shap-e/blob/8625e7c15526d8510a2292f92165979268d0e945/shap_e/models/stf/base.py#L18

@unixpickle probably wrote something that's not supported in all python versions, it should probably be removed/changed to have a wider support.

bolshoytoster avatar May 08 '23 09:05 bolshoytoster

Out of curiosity @kashyap2108 , what is the Python version you are using?

unixpickle avatar May 08 '23 18:05 unixpickle

I got this error when I ran the code on python=3.8, and this error no longer exists after I updating python to 3.92

scentof avatar May 09 '23 00:05 scentof

I got this error when I ran the code on python=3.8, and this error no longer exists after I updating python to 3.92

@scentof what OS are you using?

escoolioinglesias avatar May 15 '23 10:05 escoolioinglesias

Same issue here when using 3.8, fixed by updating to 3.10.

eavidal avatar Jun 02 '23 09:06 eavidal