[SOLVED] ftrack_api.event.hub.EventHub : Received packet: 2:: message appears, then maya crashes
2 2

10 posts in this topic

Every so often I'll start to get this message: 

 

ftrack_api.event.hub.EventHub : Received packet: 2::

 

I'm using charcoal editor for a script editor, and when I open it up, ftrack will crash.   Maya doesn't crash if I open up the default script editor.  This message happens about once every 2 seconds and fills up the script editor output window and is very annoying.  Any thoughts on how to fix this?  I just restarted my computer and it didn't resolve the issues.

Share this post


Link to post
Share on other sites

Hi Mike,

Quote

ftrack_api.event.hub.EventHub : Received packet: 2::

Do you get this message in the ordinary script editor? It sounds like python logging level is set to debug.

9 hours ago, Mike said:

I'm using charcoal editor for a script editor, and when I open it up, ftrack will crash.   Maya doesn't crash if I open up the default script editor.  This message happens about once every 2 seconds and fills up the script editor output window and is very annoying.  Any thoughts on how to fix this?  I just restarted my computer and it didn't resolve the issues.

How is ftrack crashing? The plugins stops working or something else?

Share this post


Link to post
Share on other sites

Hi Mattias,

 

Yes, I get this message in the ordinary script editor as well.  When I open up the ordinary script editor, the message displays and keeps filling up the output window, but no crashes occur.  When I open up charcoal editor, the second I interact with Maya (click on an active viewport or start to type for example) it freezes up and then an error window pops up (attached).  

I'm working on a userSetup.py file and this seems to be consistently triggering the ' ftrack_api.event.hub.EventHub : Received packet: 2:: ' message.  However I've had this happen in the past while I wasn't working on a userSetup.py.

In this userSetup.py I'm trying to turn on mtoa.mll (Arnold plugin) at startup.

This line is causing the problem: 

utils.executeDeffered('scMenuMarker.turn_on_mota()')

# Turn on arnold
def turn_on_mota():
	if not mc.pluginInfo( "mtoa.mll", l=1, q=1 ):
		mc.pluginInfo( "mtoa.mll", edit=1, autoload=True )
		mc.loadPlugin( "mtoa.mll" )
 
	else:
 
		pass

error.PNG

Share this post


Link to post
Share on other sites

I was able to fix the crashing and occurance of the packet message by changing the way turn_on_mota() was being run.

Instead of using utils.executeDeffered, I used import maya.cmds as mc; mc.evalDeferred('scMenuMarker.turn_on_mota()') .

Not sure why this worked, but it did!

Share this post


Link to post
Share on other sites
On 2/10/2016 at 5:20 PM, Mike said:

I was able to fix the crashing and occurance of the packet message by changing the way turn_on_mota() was being run.

Instead of using utils.executeDeffered, I used import maya.cmds as mc; mc.evalDeferred('scMenuMarker.turn_on_mota()') .

Not sure why this worked, but it did!

I'm glad to hear that you solved the crashing - sounds very odd.

Are you using the ftrack-python-api yourself in some custom code you run? The logs you see is from the ftrack api event hub when it receives an event from the ftrack event service.

Share this post


Link to post
Share on other sites

Forgot to respond to this,

I'm using a custom code, but I can't figure out where the logging level has been set!  It's making it so difficult to problem solve my script in Maya because the info just scrolls away.  Any idea on how I can fix this? Thanks

Capture.JPG

Share this post


Link to post
Share on other sites

Hi Lorenzo,

Yes, I've set my level to INFO, but when Mattias said that it sounded like the python logging level had been set to debug, I thought he meant that something inside the ftrack source code was set to debug. Didn't realize he meant my code! This is my first time using a logger, so I'm not very familiar with the best practices.  Most of my logging messages are on the info level, is this too far down for normal usage?

I tried setting the logging level to WARNING and I'm still getting the ftrack event spam.

Share this post


Link to post
Share on other sites

So I finally found the problem.  I was using pymel in a few modules, specifically inside of a userSetup.py to create a main window menu in Maya.  Replacing `import pymel.core as pmc` with `import maya.cmds as mc` and then fixing a few of the commands solved everything.

EDIT: also, I think the problem was related to my installation of arnold not being in the default location. Setting my Arnold envs to look for things in the default location eliminated the errors

Share this post


Link to post
Share on other sites

Late to the party I know, but if you (or anyone searching for this issue) needs a solution to the 'EventHub : Sent Packet: 2 ::' , 'EventHub : Received Packet: 2 ::' spam, you can add the argument:

auto_connect_event_hub=False

to your initial session:

session = ftrack_api.Session(server_url='https://COMPANY.ftrackapp.com', api_key='KEYKEYKEY',api_user='USERNAME', auto_connect_event_hub=False)

and that should stop the constant pinging.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
2 2