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

ax.lines = [] AttributeError: can't set attribute #6

Closed
Pavankunchala opened this issue Oct 7, 2022 · 8 comments
Closed

ax.lines = [] AttributeError: can't set attribute #6

Pavankunchala opened this issue Oct 7, 2022 · 8 comments

Comments

@Pavankunchala
Copy link

Pavankunchala commented Oct 7, 2022

while trying to run the sample code

python -m sample --model_path ./save/humanml_trans_enc_512/model000200000.pt --num_samples 10 --num_repetitions 3

I am getting this error

AttributeError: can't set attribute 
@GuyTevet
Copy link
Owner

GuyTevet commented Oct 7, 2022

Can you please share the full trace of the error?

@lucasjinreal
Copy link

@GuyTevet Hi, the code can not run, got same error as above with a decent matplotlib:

matplotlib 3.6.1

Since all other project relays on newest matplotlib, it's better changing the code to adopt to latest API

@zhustrong
Copy link

@jinfagang @GuyTevet Hi guys, this issue is caused by the matplotlib version. I got the same error when used the version >3.5.0. It very easy to fixed in these matplotlib versions. You can just change this file "motion-diffusion-model/data_loaders/humanml/utils/plot_script.py" in lines 89~92
ax._lines = []
ax._collections = []
ax.view_init(elev=120, azim=-90)
ax._dist = 7.5

@felixdivo
Copy link

@zhustrong thank you for you hint! However, it makes the animation blank. It's just the number at the top and else a completely white frame. 🙃 I'm on version 3.7.1:
animation_0

On version 3.5.0 I get this behaviour:
animation_0

@ZhiPengYU28
Copy link

ZhiPengYU28 commented Jan 6, 2024

Hey, I just change the code (line 184-187) in motion-diffusion-model/data_loaders/ humanml/utils/plot_script.py
from:

    ax.lines = []
    ax.collections = []
    ax.view_init(elev=120, azim=-90)
    ax.dist = 7.5

to:

    ax.clear()
    # ax.lines = []
    # ax.collections = []
    ax.view_init(elev=120, azim=-90)
    ax.dist = 7.5

Hope it is useful.

@friendlyCamel
Copy link

Hey, I just change the code (line 184-187) in motion-diffusion-model/data_loaders/ humanml/utils/plot_script.py from:

    ax.lines = []
    ax.collections = []
    ax.view_init(elev=120, azim=-90)
    ax.dist = 7.5

to:

    ax.clear()
    # ax.lines = []
    # ax.collections = []
    ax.view_init(elev=120, azim=-90)
    ax.dist = 7.5

Hope it is useful.

it work under matplotlib==3.5.0~ thanks for hint!

@y0ngw00
Copy link

y0ngw00 commented Apr 24, 2024

Hey, I just change the code (line 184-187) in motion-diffusion-model/data_loaders/ humanml/utils/plot_script.py from:

    ax.lines = []
    ax.collections = []
    ax.view_init(elev=120, azim=-90)
    ax.dist = 7.5

to:

    ax.clear()
    # ax.lines = []
    # ax.collections = []
    ax.view_init(elev=120, azim=-90)
    ax.dist = 7.5

Hope it is useful.

It works on mine. Thank you!

@Kairobo
Copy link

Kairobo commented Oct 6, 2024

Hey, I just change the code (line 184-187) in motion-diffusion-model/data_loaders/ humanml/utils/plot_script.py from:

    ax.lines = []
    ax.collections = []
    ax.view_init(elev=120, azim=-90)
    ax.dist = 7.5

to:

    ax.clear()
    # ax.lines = []
    # ax.collections = []
    ax.view_init(elev=120, azim=-90)
    ax.dist = 7.5

Hope it is useful.

It works in matplotlib==3.5.0. But would change not the dist. I found ax._dist=7.5 would fix it.

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

9 participants