Mike Posted February 8, 2016 Report Share Posted February 8, 2016 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. Link to comment Share on other sites More sharing options...
Mattias Lagergren Posted February 9, 2016 Report Share Posted February 9, 2016 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? Link to comment Share on other sites More sharing options...
Mike Posted February 9, 2016 Author Report Share Posted February 9, 2016 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 Link to comment Share on other sites More sharing options...
Mike Posted February 10, 2016 Author Report Share Posted February 10, 2016 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! Link to comment Share on other sites More sharing options...
Mattias Lagergren Posted February 12, 2016 Report Share Posted February 12, 2016 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. Link to comment Share on other sites More sharing options...
Mike Posted July 18, 2016 Author Report Share Posted July 18, 2016 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 Link to comment Share on other sites More sharing options...
lorenzo.angeli Posted July 20, 2016 Report Share Posted July 20, 2016 Hi , have you been trying something like this ? (at the beginning of your custom code) import logging logger = logging.getLogger() logger.setLevel(logging.WARNING) # or set it to INFO if you prefer Cheers. L. Link to comment Share on other sites More sharing options...
Mike Posted July 20, 2016 Author Report Share Posted July 20, 2016 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. Link to comment Share on other sites More sharing options...
Mike Posted September 7, 2016 Author Report Share Posted September 7, 2016 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 Link to comment Share on other sites More sharing options...
PhilS Posted October 5, 2017 Report Share Posted October 5, 2017 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.