CreateRenderJob() R16.038

On 04/04/2015 at 13:37, xxxxxxxx wrote:

I try to create a render job but I get an exception for the username parameter:

Traceback (most recent call last) :
  File "'scriptmanager'", line 24, in <module>
  File "'scriptmanager'", line 12, in main
AttributeError: 'str' object has no attribute 'bytes'
import c4d
import uuid
net_service = c4d.modules.net.GetGlobalNetRenderService()
  
def main() :
    filename = c4d.storage.LoadDialog()
    if not filename:
        return
  
    result = net_service.CreateRenderJob(
        filename, uuid.uuid4(), c4d.RENDERJOBCREATOR_USER, 'Niklas')
    if result == c4d.CREATEJOBRESULT_OK:
        print "Job Created"
    elif result == c4d.CREATEJOBRESULT_OUTOFMEMORY:
        print "Out of Memory"
    elif result == c4d.CREATEJOBRESULT_ASSETMISSING:
        print "Asset Missing"
    elif result == c4d.CREATEJOBRESULT_SAVINGFAILED:
        print "Saving Failed"
    elif result == c4d.CREATEJOBRESULT_REPOSITORYERROR:
        print "Repository Error"
  
main()

Looks like a bug to me, the C++ SDK also says the parameter would need to be a string.
Or is there some other type that I need to wrap the username with?

Thanks
Niklas

On 07/04/2015 at 02:46, xxxxxxxx wrote:

Hi Niklas,

I confirm there's an issue with the "username" parameter of NetRenderService.CreateRenderJob(). Thanks for reporting it.

On 07/04/2015 at 10:46, xxxxxxxx wrote:

I'll move this thread to the Bug Reports conference.