Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added warning for no path cache found #706

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

j0yu
Copy link

@j0yu j0yu commented Jun 12, 2019

Ran into an error while trying to launch an app. Turns out it was just not cached from tank cache_apps
but the error message looked like this in ~/.shotgun/logs/tk-shotgun.log

2019-06-12 12:58:29,697 [21599 ERROR sgtk.ext...tk_desktop.site_communication] [PROXY] Error calling __commands::katana_3.1_(arnold_5.3)((), {}):
Traceback (most recent call last):
  File "/path/to/config/install/app_store/tk-desktop/v2.4.12/python/tk_desktop/desktop_engine_project_implementation.py", line 164, in _trigger_callback
    callback(*args, **kwargs)
  File "/path/to/config/install/core/python/tank/platform/engine.py", line 1084, in callback_wrapper
    return callback(*args, **kwargs)
  File "/path/to/config/install/app_store/tk-multi-launchapp/v0.10.3/python/tk_multi_launchapp/base_launcher.py", line 125, in launch_version
    *args, **kwargs
  File "/path/to/config/install/app_store/tk-multi-launchapp/v0.10.3/python/tk_multi_launchapp/base_launcher.py", line 354, in _launch_callback
    file_to_open,
  File "/path/to/config/install/app_store/tk-multi-launchapp/v0.10.3/python/tk_multi_launchapp/base_launcher.py", line 167, in _launch_app
    app_engine, app_path, app_args, context, file_to_open
  File "/path/to/config/install/app_store/tk-multi-launchapp/v0.10.3/python/tk_multi_launchapp/prepare_apps.py", line 47, in prepare_launch_for_engine
    launch_info = launcher.prepare_launch(app_path, app_args, file_to_open)
  File "/path/to/config/install/git/tk-katana.git/v0.1.0+wwfx.1.5.0/startup.py", line 102, in prepare_launch
    startup_paths.extend(self._get_resource_paths())
  File "/path/to/config/install/git/tk-katana.git/v0.1.0+wwfx.1.5.0/startup.py", line 73, in _get_resource_paths
    resource_path = os.path.join(path, "resources", "Katana")
  File "/path/to/shotgun_desktop/Python/lib/python2.7/posixpath.py", line 70, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

To make it more obvious, I added a simple warning about non-cached descriptors.

Now the (potential) cause of the error is more obvious from the logs:

2019-06-12 13:22:29,499 [21599 DEBUG sgtk.ext...tk_desktop.site_communication] [PROXY] Loading environment data from path: /path/to/config/config/env/project.yml
2019-06-12 13:22:29,800 [21599 WARNING sgtk.ext...tk_desktop.site_communication] [PROXY] No cache path found for: sgtk:descriptor:[email protected]:shotgun/tk-katana-lookfilebakenode.git&version=v1.0.1
2019-06-12 13:22:29,810 [21599 WARNING sgtk.ext...tk_desktop.site_communication] [PROXY] Please consider running "tank cache_apps"
2019-06-12 13:22:29,819 [21599 ERROR sgtk.ext...tk_desktop.site_communication] [PROXY] Error calling __commands::katana_3.1_(arnold_5.3)((), {}):
Traceback (most recent call last):
  File "/path/to/config/install/app_store/tk-desktop/v2.4.12/python/tk_desktop/desktop_engine_project_implementation.py", line 164, in _trigger_callback
    callback(*args, **kwargs)
  File "/path/to/config/install/core/python/tank/platform/engine.py", line 1084, in callback_wrapper
    return callback(*args, **kwargs)
...etc...

@coveralls
Copy link

Pull Request Test Coverage Report for Build 2933

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 188 unchanged lines in 16 files lost coverage.
  • Overall coverage decreased (-1.05%) to 68.939%

Files with Coverage Reduction New Missed Lines %
python/tank/util/zip.py 1 94.83%
python/tank/bootstrap/resolver.py 1 96.52%
python/tank/commands/tank_command.py 1 45.36%
python/tank/commands/setup_project_params.py 1 65.6%
python/tank/authentication/user.py 2 59.34%
python/tank/authentication/user_impl.py 2 77.46%
python/tank/hook.py 2 89.84%
python/tank/log.py 3 77.3%
python/tank/bootstrap/configuration.py 4 87.04%
python/tank/descriptor/descriptor_config.py 6 88.89%
Totals Coverage Status
Change from base Build 2924: -1.05%
Covered Lines: 12307
Relevant Lines: 17852

💛 - Coveralls

@jfboismenu jfboismenu self-assigned this Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants