UNSOLVED Assign Render Path

Has something changed in the last few years? I get an error running this.

>>> renderData[c4d.RDATA_PATH] = r"MyPicturePath.exr"
TypeError: GeListNode_ass_subscript expected Description identifier, not str
The above exception was the direct cause of the following exception:
SystemError: _PyEval_EvalFrameDefault returned a result with an error set

c4d.RDATA_PATH evaluates to a string, but its looking for the type Description identifier

Now in 2022 I'm getting an error using SetFilename(). It expects an int where c4d.RDATA_PATH evaluates to the string 'from_code_filename'. I'm new to C4D..has the c4d constants been changed from ints to strings?

Example:

>>> doc.GetActiveRenderData().GetData().SetFilename(c4d.RDATA_PATH, str("my_filename"))
Traceback (most recent call last):
  File "console", line 1, in <module>
TypeError: an integer is required (got type str)

Hi @wanderingstan first of all welcome in hte plugin cafe community. Please create your own topic, it's easier for us to track it. moreover you don't need to post on different topic the same subject. We usually answers within a day. Finally please read our support guideline.

Regarding your question here it work as expected when I run the next code in the Python Console.
doc.GetActiveRenderData().GetDataInstance().SetFilename(c4d.RDATA_PATH, r"test")

One crucial information to share when you give us code sample is the context (the python console, a plugin ,the script manager, etc...) In your case at least the second one I expect it to run from the Python Console, so it should be fine.

Regarding your issue I would say please try to restart Cinema 4D, while you tested you may have corrupted the c4d python module by writing something like c4d.RDATA_PATH = "my filename".

Side note, we will be away the 26th and 27th December, so don't be surprise by the delay if you have follow-up questions, for more information see No support on 26/12 and 27/12.

Cheers,
Maxime.