Guest User

Untitled

a guest
Sep 8th, 2022
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 4.68 KB | Source Code | 0 0
  1. class test(Scene):
  2.     def construct(self):
  3.         vertices = [1, 2, 3, 4]
  4.         edges = [(1, 2), (2, 3), (3, 4), (1, 3), (1, 4)]
  5.         g = Graph(vertices, edges)
  6.         self.play(Create(g))
  7.         self.wait()
  8.         self.play(g[1].animate.move_to([1, 1, 0]),
  9.                   g[2].animate.move_to([-1, 1, 0]),
  10.                   g[3].animate.move_to([1, -1, 0]),
  11.                   g[4].animate.move_to([-1, -1, 0]))
  12.         self.wait()
  13.  
  14.  
  15.        
  16. PS C:\Users\Anwender\PycharmProjects\3xPLUS1MAnim> manim -pqm main.py test
  17. Manim Community v0.16.0.post0
  18.  
  19. Traceback (most recent call last):
  20. ╭──────────────────────────────────────────────────────────────────────────────────────╮
  21. │ File "C:\Users\Anwender\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_q│
  22. │bz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\manim\cli\render\comman│
  23. │ds.py", line 121, in render                                                           │
  24. │    118             try:                                                              │
  25. │    119                 with tempconfig(config):                                      │
  26. │    120                     scene = SceneClass()                                      │
  27. │  ❱ 121                     scene.render()                                            │
  28. │    122             except Exception:                                                 │
  29. │    123                 error_console.print_exception()                               │
  30. │    124                 sys.exit(1)                                                   │
  31. │ File "C:\Users\Anwender\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_q│
  32. │bz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\manim\scene\scene.py",
  33. │line 222, in render                                                                   │
  34. │     219         """                                                                  │
  35. │     220         self.setup()                                                         │
  36. │     221         try:                                                                 │
  37. │  ❱  222             self.construct()                                                 │
  38. │     223         except EndSceneEarlyException:                                       │
  39. │     224             pass                                                             │
  40. │     225         except RerunSceneException as e:                                     │
  41. │ File "C:\Users\Anwender\PycharmProjects\3xPLUS1MAnim\main.py", line 41, in construct │
  42. │    38     def construct(self):                                                       │
  43. │    39         vertices = [1, 2, 3, 4]                                                │
  44. │    40         edges = [(1, 2), (2, 3), (3, 4), (1, 3), (1, 4)]                       │
  45. │  ❱ 41         g = Graph(vertices, edges)                                             │
  46. │    42         self.play(Create(g))                                                   │
  47. │    43         self.wait()                                                            │
  48. │    44         self.play(g[1].animate.move_to([1, 1, 0]),                             │
  49. │ File "C:\Users\Anwender\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_q│
  50. │bz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\manim\scene\scene.py", │
  51. │line 140, in __init__                                                                 │
  52. │     137             )                                                                │
  53. │     138         else:                                                                │
  54. │     139             self.renderer = renderer                                         │
  55. │  ❱  140         self.renderer.init_scene(self)                                       │
  56. │     141                                                                              │
  57. │     142         self.mobjects = []                                                   │
  58. │     143         # TODO, remove need for foreground mobjects                          │
  59. ╰──────────────────────────────────────────────────────────────────────────────────────╯
  60. AttributeError: 'list' object has no attribute 'init_scene'
  61.  
  62.  
Advertisement
Add Comment
Please, Sign In to add comment