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

AttributeError encountered in generating and saving a 3D animation #20

Open
OrbitalMechanic opened this issue Dec 27, 2020 · 0 comments

Comments

@OrbitalMechanic
Copy link

I'm running OrbitalPy on a Mac Pro (2019) under Mac OS X Big Sur using the Anaconda distribution Python 3.7. Version 3.3.3 of Matplotlib is used. I get the following messages when I attempt to generate a 3D plot with animation turned on and when attempting to sate the animation to a .mp4 file:

`================================================================================
December 27, 2020 at 03:28:11
~/Keplerain Orbit Trajectory Plots - OrbitalPy-v0.7.0(python3)/OrbitalPy_Hohmann.py

Exception in Tkinter callback
Traceback (most recent call last):
File "/Users/user/opt/anaconda3/lib/python3.7/tkinter/init.py", line 1705, in call
return self.func(*args)
File "/Users/user/opt/anaconda3/lib/python3.7/tkinter/init.py", line 749, in callit
func(*args)
File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/matplotlib/backends/_backend_tk.py", line 253, in idle_draw
self.draw()
File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/matplotlib/backends/backend_tkagg.py", line 9, in draw
super(FigureCanvasTkAgg, self).draw()
File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/matplotlib/backends/backend_agg.py", line 407, in draw
self.figure.draw(self.renderer)
File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/matplotlib/artist.py", line 41, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/matplotlib/figure.py", line 1870, in draw
self.canvas.draw_event(renderer)
File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/matplotlib/backend_bases.py", line 1759, in draw_event
self.callbacks.process(s, event)
File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/matplotlib/cbook/init.py", line 229, in process
self.exception_handler(exc)
File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/matplotlib/cbook/init.py", line 81, in _exception_printer
raise exc
File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/matplotlib/cbook/init.py", line 224, in process
func(*args, **kwargs)
File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/matplotlib/animation.py", line 959, in _start
self._init_draw()
File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/matplotlib/animation.py", line 1703, in _init_draw
self._draw_frame(next(self.new_frame_seq()))
File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/matplotlib/animation.py", line 1726, in _draw_frame
self._drawn_artists = self._func(framedata, *self._args)
File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/orbital/plotting.py", line 238, in animate
self.pos_dot.set_3d_properties([z])
File "/Users/user/opt/anaconda3/lib/python3.7/site-packages/mpl_toolkits/mplot3d/art3d.py", line 143, in set_3d_properties
zs = np.broadcast_to(zs, xs.shape)
AttributeError: 'list' object has no attribute 'shape'
`
The Python program is attached to this note.

Any suggestions?

Sam Dupree.

OrbitalPy_Hohmann.py.txt

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