Guest User

Untitled

a guest
Oct 31st, 2024
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.15 KB | None | 0 0
  1. ---------------------------------------------------------------------------
  2. TypeError Traceback (most recent call last)
  3. Cell In[3], line 1
  4. ----> 1 get_ipython().run_cell_magic('manim', '-qm HelloCircle', '\nclass HelloCircle(Scene):\n def construct(self):\n # blue_circle = Circle(color=BLUE, fill_opacity=0.5)\n # We can also create a "plain" circle and add the desired attributes via set methods:\n circle = Circle()\n blue_circle = circle.set_color(BLUE).set_opacity(0.5)\n \n label = Text("A wild circle appears!")\n label.next_to(blue_circle, DOWN, buff=0.5)\n \n self.play(Create(blue_circle), Write(label))\n self.wait()\n')
  5.  
  6. File /usr/local/lib/python3.11/site-packages/IPython/core/interactiveshell.py:2541, in InteractiveShell.run_cell_magic(self, magic_name, line, cell)
  7. 2539 with self.builtin_trap:
  8. 2540 args = (magic_arg_s, cell)
  9. -> 2541 result = fn(*args, **kwargs)
  10. 2543 # The code below prevents the output from being displayed
  11. 2544 # when using magics with decorator @output_can_be_silenced
  12. 2545 # when the last Python token in the expression is a ';'.
  13. 2546 if getattr(fn, magic.MAGIC_OUTPUT_CAN_BE_SILENCED, False):
  14.  
  15. File /usr/local/lib/python3.11/site-packages/manim/utils/ipython_magic.py:129, in ManimMagic.manim(self, line, cell, local_ns)
  16. 126 return
  17. 128 modified_args = self.add_additional_args(args)
  18. --> 129 args = main(modified_args, standalone_mode=False, prog_name="manim")
  19. 130 with tempconfig(local_ns.get("config", {})):
  20. 131 config.digest_args(args)
  21.  
  22. File /usr/local/lib/python3.11/site-packages/click/core.py:1157, in BaseCommand.__call__(self, *args, **kwargs)
  23. 1155 def __call__(self, *args: t.Any, **kwargs: t.Any) -> t.Any:
  24. 1156 """Alias for :meth:`main`."""
  25. -> 1157 return self.main(*args, **kwargs)
  26.  
  27. File /usr/local/lib/python3.11/site-packages/click/core.py:1078, in BaseCommand.main(self, args, prog_name, complete_var, standalone_mode, windows_expand_args, **extra)
  28. 1076 try:
  29. 1077 with self.make_context(prog_name, args, **extra) as ctx:
  30. -> 1078 rv = self.invoke(ctx)
  31. 1079 if not standalone_mode:
  32. 1080 return rv
  33.  
  34. File /usr/local/lib/python3.11/site-packages/click/core.py:1686, in MultiCommand.invoke(self, ctx)
  35. 1684 ctx.invoked_subcommand = cmd_name
  36. 1685 super().invoke(ctx)
  37. -> 1686 sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)
  38. 1687 with sub_ctx:
  39. 1688 return _process_result(sub_ctx.command.invoke(sub_ctx))
  40.  
  41. File /usr/local/lib/python3.11/site-packages/click/core.py:943, in BaseCommand.make_context(self, info_name, args, parent, **extra)
  42. 938 ctx = self.context_class(
  43. 939 self, info_name=info_name, parent=parent, **extra # type: ignore
  44. 940 )
  45. 942 with ctx.scope(cleanup=False):
  46. --> 943 self.parse_args(ctx, args)
  47. 944 return ctx
  48.  
  49. File /usr/local/lib/python3.11/site-packages/cloup/constraints/_support.py:183, in ConstraintMixin.parse_args(self, ctx, args)
  50. 180 for constr in self.all_constraints:
  51. 181 constr.check_consistency()
  52. --> 183 args = super().parse_args(ctx, args) # type: ignore
  53. 185 # Skip constraints checking if the user wants to see --help for subcommand
  54. 186 # or if resilient parsing is enabled
  55. 187 should_show_subcommand_help = isinstance(ctx.command, click.Group) and any(
  56. 188 help_flag in args for help_flag in ctx.help_option_names
  57. 189 )
  58.  
  59. File /usr/local/lib/python3.11/site-packages/click/core.py:1408, in Command.parse_args(self, ctx, args)
  60. 1405 opts, args, param_order = parser.parse_args(args=args)
  61. 1407 for param in iter_params_for_processing(param_order, self.get_params(ctx)):
  62. -> 1408 value, args = param.handle_parse_result(ctx, opts, args)
  63. 1410 if args and not ctx.allow_extra_args and not ctx.resilient_parsing:
  64. 1411 ctx.fail(
  65. 1412 ngettext(
  66. 1413 "Got unexpected extra argument ({args})",
  67. (...)
  68. 1416 ).format(args=" ".join(map(str, args)))
  69. 1417 )
  70.  
  71. File /usr/local/lib/python3.11/site-packages/click/core.py:2400, in Parameter.handle_parse_result(self, ctx, opts, args)
  72. 2397 ctx.set_parameter_source(self.name, source) # type: ignore
  73. 2399 try:
  74. -> 2400 value = self.process_value(ctx, value)
  75. 2401 except Exception:
  76. 2402 if not ctx.resilient_parsing:
  77.  
  78. File /usr/local/lib/python3.11/site-packages/click/core.py:2356, in Parameter.process_value(self, ctx, value)
  79. 2355 def process_value(self, ctx: Context, value: t.Any) -> t.Any:
  80. -> 2356 value = self.type_cast_value(ctx, value)
  81. 2358 if self.required and self.value_is_missing(value):
  82. 2359 raise MissingParameter(ctx=ctx, param=self)
  83.  
  84. File /usr/local/lib/python3.11/site-packages/click/core.py:2344, in Parameter.type_cast_value(self, ctx, value)
  85. 2341 if self.multiple:
  86. 2342 return tuple(convert(x) for x in check_iter(value))
  87. -> 2344 return convert(value)
  88.  
  89. File /usr/local/lib/python3.11/site-packages/click/core.py:2316, in Parameter.type_cast_value.<locals>.convert(value)
  90. 2315 def convert(value: t.Any) -> t.Any:
  91. -> 2316 return self.type(value, param=self, ctx=ctx)
  92.  
  93. File /usr/local/lib/python3.11/site-packages/click/types.py:83, in ParamType.__call__(self, value, param, ctx)
  94. 76 def __call__(
  95. 77 self,
  96. 78 value: t.Any,
  97. 79 param: t.Optional["Parameter"] = None,
  98. 80 ctx: t.Optional["Context"] = None,
  99. 81 ) -> t.Any:
  100. 82 if value is not None:
  101. ---> 83 return self.convert(value, param, ctx)
  102.  
  103. File /usr/local/lib/python3.11/site-packages/click/types.py:300, in Choice.convert(self, value, param, ctx)
  104. 293 return normed_choices[normed_value]
  105. 295 choices_str = ", ".join(map(repr, self.choices))
  106. 296 self.fail(
  107. 297 ngettext(
  108. 298 "{value!r} is not {choice}.",
  109. 299 "{value!r} is not one of {choices}.",
  110. --> 300 len(self.choices),
  111. 301 ).format(value=value, choice=choices_str, choices=choices_str),
  112. 302 param,
  113. 303 ctx,
  114. 304 )
  115.  
  116. TypeError: object of type 'list_reverseiterator' has no len()
Add Comment
Please, Sign In to add comment