Jump to content

Konstantin Maslyuk

Members
  • Posts

    57
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Konstantin Maslyuk

  1. In order someone to build ftrack-connect-spark and ftrack-connect-spark-adobe, there is a PR to update ftrack-connect-spark that resolves most of issues: https://bitbucket.org/ftrack/ftrack-connect-spark/pull-requests/65
  2. @Jason Porath I found quite fine running running unit and functional tests on test projects right on production server. It is quite easy to construct any context with ftrack_api and release it after tests finished. In worst case you will got a bunch of test entities on test project that no one cares. so feel free to: @pytest.fixture def session(): return ftrack_api.Session() @pytest.fixture def context(request, session­čś× context = session.create('Folder', {'parent_id': ..., 'project_id': ..., 'name': ...}) def finalizer(): session.rollback() session.delete(context) session.commit() request.addfinalizer(finalizer) return context The better approach is to running tests on staging ftrack server that should have relative fresh database snapshot from production, that is much more complex.
  3. Hi, you could try now pip install ftrack-python-api==2.2.0rc1 or https://bitbucket.org/ftrack/ftrack-python-api/branch/backlog/threading/story#diff that is indented to solve threading issue.
  4. Logging an uncaught exception Traceback (most recent call last): File "\\somewhere\ftrack_connect_pipeline\util.py", line 28, in exceptHookWrapper method(*args, **kwargs) File "\\somewhere\ftrack_connect_pipeline\ui\widget\actions.py", line 308, in _addRecentAction recentActions = self._getRecentActions() File "\\somewhere\ftrack_connect_pipeline\ui\widget\actions.py", line 276, in _getRecentActions if not self._isRecentActionsEnabled(): File "\\somewhere\ftrack_connect_pipeline\ui\widget\actions.py", line 255, in _isRecentActionsEnabled session = ftrack_connect_pipeline.util.get_thread_session() File "\\somewhere\ftrack_connect_pipeline\util.py", line 153, in get_thread_session thread._ftrack_session = get_session() File "\\somewhere\ftrack_connect_pipeline\util.py", line 140, in get_session auto_connect_event_hub=False File "C:\Program Files (x86)\ftrack-connect-package-1.1.2\common.zip\ftrack_api\session.py", line 268, in __init__ self._discover_plugins(plugin_arguments=plugin_arguments) File "C:\Program Files (x86)\ftrack-connect-package-1.1.2\common.zip\ftrack_api\session.py", line 1362, in _discover_plugins self._plugin_paths, [self], plugin_arguments File "C:\Program Files (x86)\ftrack-connect-package-1.1.2\common.zip\ftrack_api\plugin.py", line 120, in discover **selected_keyword_arguments File "C:\Program Files (x86)\ftrack-connect-package-1.1.2\resource\hook\resolver.py", line 140, in register resolver File "C:\Program Files (x86)\ftrack-connect-package-1.1.2\common.zip\ftrack_api\event\hub.py", line 406, in subscribe subscription, callback, subscriber, priority File "C:\Program Files (x86)\ftrack-connect-package-1.1.2\common.zip\ftrack_api\event\hub.py", line 453, in _add_subscriber priority=priority File "C:\Program Files (x86)\ftrack-connect-package-1.1.2\common.zip\ftrack_api\event\subscriber.py", line 13, in __init__ subscription File "C:\Program Files (x86)\ftrack-connect-package-1.1.2\common.zip\ftrack_api\event\subscription.py", line 15, in __init__ self._expression = self.parser.parse(subscription) File "C:\Program Files (x86)\ftrack-connect-package-1.1.2\common.zip\ftrack_api\event\expression.py", line 94, in parse 'Failed to parse: {0}. {1}'.format(expression, error) ParseError: Failed to parse: topic=ftrack.location.request-resolve and source.user.username="xxxxxx@xxxxxxx.com". Some times i encounter exceptions when initialize a Session some time i got exception when working with locations, the real exception here is completely obscured. Could i suggest to do logging.exception() before raising another exception in exception handler?
  5. hm, another issue under py3 (Pdb) pp sys.version_info sys.version_info(major=3, minor=6, micro=8, releaselevel='final', serial=0) (Pdb) bool(server_location.resource_identifier_transformer) True (Pdb) server_location.resource_identifier_transformer Symbol(NOT_SET)
  6. It look like the problem is that ftrack_api.Session._request.post() have no timeout in ftrack_api.Session.call(), so control never returned to main thread to test EventHub connection
  7. Hi, all. I making ftrack services with docker containers with auto restart and i found that if you disconnect a network with docker, event hub will just attempt to to reconnect 30 times * 10 seconds and then just sleep. Event EventHub.connected will be truth, i think it is because of unlogged error in EventHub.disconnect()
  8. @Lorenzo Angeli finally i still think that schema loading code is not optimized, a lot of unnecessary work occur inside single process. I could suggest pull request for caching schema.
  9. My python version and platform: v2.7.17:c2f86d86e6, win32 You right, i cant reproduce my issue with clean cases: list(concurrent.futures.ThreadPoolExecutor(3).map(apply, [ftrack_api.Session] * 3)) nither: pip install git+https://bitbucket.org/ftrack/ftrack-connect-pipeline.git git+https://bitbucket.org/ftrack/ftrack-connect-maya-publish.git https://bitbucket.org/ftrack/qtext/get/0.2.1.zip PySide ftrack-python-legacy-api python -c "import ftrack_api, pyblish.api, ftrack_connect_pipeline.publish as p, ftrack_connect_pipeline, ftrack_connect_pipeline.application_plugin as g; from QtExt import QtWidgets;import urllib;import logging;logging.basicConfig(level=logging.INFO);G = type('G', (g.BaseApplicationPlugin, ), dict(get_plugin_information=lambda s: {}));a = QtWidgets.QApplication([]);d = {};exec(urllib.urlopen('https://bitbucket.org/ftrack/ftrack-connect-maya-publish/raw/808a548e1a4f409890c864f3234a7381bdd1b590/resource/application_hook/register_scene_asset.py').read(), d);g=G('68e9a0ac-355d-11ea-8ce6-000c29ff458b');import ftrack_connect_pipeline.shared_pyblish_plugins;ftrack_connect_pipeline.shared_pyblish_plugins.register(); pyblish.api.register_plugin(type('Y', (pyblish.api.ContextPlugin, ), dict(order=pyblish.api.CollectorOrder+0.01, process=lambda self, context: context.data.update(dict(ftrack_entity=ftrack_api.Session().get('Context', context.data['ftrack_entity']['id'])))))); d['register'](g.api_session); g.register_assets();ftrack_connect_pipeline.register_plugin(g);p.Publish(g).open()" (that is a midnight fun). I will investigate my modifications to ftrack_connect_pipeline. My issue occur when user clicks on workflow, it is added to recent actions in async way that cause (with my modification) new session to be created, then pyblish cycle create session to renew current entity.
  10. Hello, i have a case where two ftrack sessions initialized simultaneously from different threads, with overall time spent of 20 seconds, here is profiling result: 200561 function calls (158003 primitive calls) in 21.062 seconds Ordered by: cumulative time ncalls tottime percall cumtime percall filename:lineno(function) 1 0.000 0.000 20.759 20.759 c:\Users\kalem\OneDrive\Work\home\dev\test\monorepo\python\inhouse\ftrack\__init__.py:56(__init__) 1 0.002 0.002 20.758 20.758 C:\Users\kalem\.virtualenvs\test\lib\site-packages\ftrack_api\session.py:76(__init__) 1 0.001 0.001 12.834 12.834 C:\Users\kalem\.virtualenvs\test\lib\site-packages\ftrack_api\session.py:1405(_load_schemas) 1 0.636 0.636 12.833 12.833 C:\Users\kalem\.virtualenvs\test\lib\site-packages\ftrack_api\session.py:1365(_read_schemas_from_cache) 5 0.000 0.000 12.202 2.440 c:\python27\lib\json\__init__.py:193(dumps) 5 1.557 0.311 12.201 2.440 c:\python27\lib\json\encoder.py:186(encode) 24534 2.515 0.000 10.643 0.000 c:\python27\lib\json\encoder.py:417(_iterencode) 26576/24534 2.605 0.000 8.129 0.000 c:\python27\lib\json\encoder.py:288(_iterencode_list) 64684/24524 5.341 0.000 5.621 0.000 c:\python27\lib\json\encoder.py:341(_iterencode_dict)
  11. Hello, I may missed something, but I think it would be convenient to have kanban board with notes with ability to filter and switching root as in table views. My particular case it's to consider notes been completed in date range. Thank you.
  12. poetry also install and run with ftrack-connect from that branch well. i knew that pip isn't robust, but case with Jinja2 3.0.0a1 was first case i encountered. Maybe there was incorrectly published package that i got into my pip cache and it was broke my installations a couple of weeks.
  13. i finally got it working in docker with following Dockerfile Dockerfile
  14. And when i attempted to do a clean install inside docker, i got following: with pip==19.3,20 docker-centos7.txt
  15. I had installed ftrack_connect without any issue (but i still have a lot of wheels in pip's cache on my windows host) Although i expected implementation of build_ext command so i may not encounter ImportError for resource module when installing in development mode. First time i encountered that error i decided that it is a bug. If i: diff --git a/setup.py b/setup.py index 39990d9..fbaf6b5 100644 --- a/setup.py +++ b/setup.py @@ -261,2 +261,3 @@ configuration = dict( 'build': Build, + 'build_ext': Build, 'build_resources': BuildResources, Then "pip install -e ./ftrack-connect && python -m ftrack_connect" does not produce an error. It may be proper to implementing resources as setuptools.Extension - i don't know. build_ext.txt
  16. Sorry, it look like there is no PySide2-cp27-win32 wheel at all. I cant realize why i encounter extension building for PySide sometimes... It look like a mess but i have no concrete suggestions but "build_ext" command.
  17. Sorry, it look like there is no PySide2-cp27-win32 wheel at all. But i cant realize why i encounter extension building for PySide sometimes... It look like a mess but i have no concrete suggestions but "build_ext" command.
  18. By the way is it possible to switch to PySide2, PySide1 is not easy to obtain nowdays. There is not wheel for windows and linux, debian:buster does not provide deb package for that under py2. I will test and let you know.
  19. When i attempt to install QtExt0.2.2 i had same error with Jinja2 3.0.0a1, but "pip install Jinja2" resolve it to 2.11.1. The rest is fine, i used docker/ubuntu:18.04.
  20. I ask you to add "python setup.py build_ext" command that will execute same command class as build command. This way one will got working package installed in development mode, so less confusion for newcomers and resolve problems with third party tools (poetry in my case). According to setuptools documentation "build_ext" is executed during "develop". The issue with dependencies is something i still investigating, i had attached log, its docker/python:2, but i had such issue on fresh windows host. Some other (not so fresh) environments i have access to resolve dependencies successfully. And attached attempt to install from that branch. jinja2.txt review-standalone-installer.txt
  21. Hello, please add support for "build_ext" command in your setup.py for following packages: ftrack-connect, ftrack-connect-pipeline and (probably) qtext. "python setup.py develop" does not call "build" instead it call "build_ext" so i'm getting not working packages installed. This is important when i use third party tools like Poetry, that create virtual env and install path and url-provided dependencies in development mode. My root problem is that ftrack-connect is not building at moment as it tries to install "Jinja2 3.0.1a" that is not py2 compatible.
  22. The only node I got it working was 9.11.2 (tested 10.18.1, 11.13.0, 13.7.0). On recent versions I got same error (log above). Although I installed dependencies, there is an issue with path separators on windows: ... File to import not found or unreadable: C:Userskalem├×sktopOneDriveWorkhome├×vsstrack-connect-sparksourcestyle_theme.scss ... I fixed it by editing config/default.js
×
×
  • Create New...