Hi everyone, im developing for my company a plugin that runs against the commandline. Now im encountering some problems, because i do not get any errors on executing my plugin. It just aborts silently during the load process.
I tried to debug it with the console in the GUI, but to no avail. It shows me some syntax errors in the main file, but once those are fixed, it just presents the
plugin_name.pyp in the Plugin Manager and "all is fine". Except for my plugin that refuses to work. I have a very old version, without external dependencies that works. After that, i moved lots of code into a external folder at
C:\Users***\AppData\Roaming\Maxon\python27\libs\VC4D. Which for some time worked until it did not. I tryied to revert to older working versions, as in go to older versions of the plugin.pyp and the libs folder. Which produced the same error.
I also tried to ouput a log, but it is just the cmd log dropped after the other plugins load (VRay, etc.).
My assumption is that somewhere in the load process something fails but without creating a error.
How do i get my plugin to drop python errors and messages again?
[expanded and clarified 31.03.2022]
edited by @ferdinand
If i add any random non existant function to the mainbody, i get a erorr such as : Traceback (most recent call last):
whatever() NameError:name 'whatever' is not defined Traceback (most recent call last):
If i do the same to the libs folder i get no such error.
I tryied the cinema4d specific folders, same outcome.
I tryied something else and removed a 2nd python installation i had.
Now i get a error
def PluginMessage(id, data): print("commandLineID: " + id) if id == c4d.C4DPL_COMMANDLINEARGS: print(sys.argv)
So i spiked my PluginMessage handler with output like this:
if PluginMessage(id, data): print("commandLineID: " + str(id) + " but needs to be " + str(c4d.C4DPL_COMMANDLINEARGS)) if id == c4d.C4DPL_COMMANDLINEARGS: print(sys.argv)
Turns out in never got any arguments and just quit.
commandLineID: 1002 but needs to be 1002
Aborting no input.So thee commandline arguments i hand down, never reach the ears of the plugin.
import io.. yes i shouldnt remove that one