pyblish / pyblish-base

Pyblish base library - see https://github.com/pyblish/pyblish for details.
Other
127 stars 59 forks source link

Default Log Call to type string #174

Closed tokejepsen closed 8 years ago

tokejepsen commented 9 years ago

Problem

Running self.log.info(1) errors out.

Solution

Default convert all data to log call to type string.

mottosso commented 9 years ago

Would this be better suited for the Nuke repo? Or have you noticed the problem in other integrations too?

tokejepsen commented 9 years ago

Got this in Maya. Dunno if its specific to QML though.

mottosso commented 9 years ago

Oh, where did the error occur? Could you post it?

tokejepsen commented 9 years ago

So the specific example is this extractor;

import os
import getpass

import pyblish.api

@pyblish.api.log
class ExtractDeadlineData(pyblish.api.Extractor):

    families = ['deadline.render']
    hosts = ['*']

    def process_instance(self, instance):
        self.log.info(instance)

And here is the error message:

capture

mottosso commented 9 years ago

Yes, that's a bug.

Investigating.

mottosso commented 9 years ago

In the meantime, you can work around it by ensuring that you only log string types.

tokejepsen commented 9 years ago

yeah, been converting the log calls to strings.

tokejepsen commented 8 years ago

This has been fixed.