Project

General

Profile

Bug #4069

pyro4 proxy errors

Added by Marcin Kuzminski [staff] about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Start date:
04.07.2016
Due date:
% Done:

0%

Estimated time:
Sorting:
Commit Number:
Affected Version:

Description

When running invoke tasks that runs proxy i'm getting this error.

/nix/store/pghc397q4rgsyzbw9vwszxifaw00frzd-python2.7-SQLAlchemy-0.9.9/lib/python2.7/site-packages/sqlalchemy/engine/default.py:579: SAWarning: Unicode type received non-unicodebind param value.
  param.append(processors[key](compiled_params[key]))
Traceback (most recent call last):
  File "/nix/store/bf36jzdxns5fixzyfygsb3x92275pzk7-python2.7-invoke-0.13.0/bin/.invoke-wrapped", line 12, in <module>
    sys.exit(program.run())
  File "/nix/store/bf36jzdxns5fixzyfygsb3x92275pzk7-python2.7-invoke-0.13.0/lib/python2.7/site-packages/invoke/program.py", line 270, in run
    self.execute()
  File "/nix/store/bf36jzdxns5fixzyfygsb3x92275pzk7-python2.7-invoke-0.13.0/lib/python2.7/site-packages/invoke/program.py", line 381, in execute
    executor.execute(*self.tasks)
  File "/nix/store/bf36jzdxns5fixzyfygsb3x92275pzk7-python2.7-invoke-0.13.0/lib/python2.7/site-packages/invoke/executor.py", line 113, in execute
    result = call.task(*args, **call.kwargs)
  File "/nix/store/bf36jzdxns5fixzyfygsb3x92275pzk7-python2.7-invoke-0.13.0/lib/python2.7/site-packages/invoke/tasks.py", line 111, in __call__
    result = self.body(*args, **kwargs)
  File "/mnt/hgfs/marcink-shared/workspace/rhodecode-automation/tasks/generate.py", line 53, in js_i18n
    gen_js_i18n.gen_js_i18n_files(ctx)
  File "/mnt/hgfs/marcink-shared/workspace/rhodecode-automation/tasks/file_generation/gen_js_i18n.py", line 96, in gen_js_i18n_files
    gen_translations(js_strings, filename_pattern)
  File "/mnt/hgfs/marcink-shared/workspace/rhodecode-automation/tasks/file_generation/gen_js_i18n.py", line 68, in gen_translations
    maybe_setup_pylons_environment()
  File "/mnt/hgfs/marcink-shared/workspace/rhodecode-automation/tasks/file_generation/__init__.py", line 29, in maybe_setup_pylons_environment
    setup_pylons_environment()
  File "/mnt/hgfs/marcink-shared/workspace/rhodecode-automation/tasks/file_generation/__init__.py", line 19, in setup_pylons_environment
    return _setup_pylons_environment(config, environ)
  File "/mnt/hgfs/marcink-shared/workspace/rhodecode-enterprise-ce/rhodecode/tests/pylons_plugin.py", line 405, in _setup_pylons_environment
    'config:' + pylons_config, relative_to=current_path)
  File "/nix/store/3287dj6vssaad5bpjn4x6rnbd2kn1wy3-python2.7-PasteDeploy-1.5.2/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/nix/store/3287dj6vssaad5bpjn4x6rnbd2kn1wy3-python2.7-PasteDeploy-1.5.2/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
    return context.create()
  File "/nix/store/3287dj6vssaad5bpjn4x6rnbd2kn1wy3-python2.7-PasteDeploy-1.5.2/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
    return self.object_type.invoke(self)
  File "/nix/store/3287dj6vssaad5bpjn4x6rnbd2kn1wy3-python2.7-PasteDeploy-1.5.2/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
    return fix_call(context.object, context.global_conf, **context.local_conf)
  File "/nix/store/3287dj6vssaad5bpjn4x6rnbd2kn1wy3-python2.7-PasteDeploy-1.5.2/lib/python2.7/site-packages/paste/deploy/util.py", line 55, in fix_call
    val = callable(*args, **kw)
  File "/mnt/hgfs/marcink-shared/workspace/rhodecode-enterprise-ce/rhodecode/config/middleware.py", line 143, in make_pyramid_app
    includeme(config)
  File "/mnt/hgfs/marcink-shared/workspace/rhodecode-enterprise-ce/rhodecode/config/middleware.py", line 241, in includeme
    **config.registry._pylons_compat_settings)
  File "/mnt/hgfs/marcink-shared/workspace/rhodecode-enterprise-ce/rhodecode/config/middleware.py", line 79, in make_app
    config = load_environment(global_conf, app_conf)
  File "/mnt/hgfs/marcink-shared/workspace/rhodecode-enterprise-ce/rhodecode/config/environment.py", line 163, in load_environment
    repo2db_mapper(ScmModel().repo_scan(repos_path), remove_obsolete=False)
  File "/mnt/hgfs/marcink-shared/workspace/rhodecode-enterprise-ce/rhodecode/model/scm.py", line 225, in repo_scan
    for name, path in get_filesystem_repos(repos_path, recursive=True):
  File "/mnt/hgfs/marcink-shared/workspace/rhodecode-enterprise-ce/rhodecode/lib/utils.py", line 224, in _get_repos
    scm_info = get_scm(cur_path)
  File "/mnt/hgfs/marcink-shared/workspace/rhodecode-enterprise-ce/rhodecode/lib/vcs/utils/helpers.py", line 62, in get_scm
    found_scms = get_scms(path)
  File "/mnt/hgfs/marcink-shared/workspace/rhodecode-enterprise-ce/rhodecode/lib/vcs/utils/helpers.py", line 60, in get_scms
    return [(scm, path) for scm in get_scms_for_path(path)]
  File "/mnt/hgfs/marcink-shared/workspace/rhodecode-enterprise-ce/rhodecode/lib/vcs/utils/helpers.py", line 111, in get_scms_for_path
    if backend.is_valid_repository(path):
  File "/mnt/hgfs/marcink-shared/workspace/rhodecode-enterprise-ce/rhodecode/lib/vcs/backends/git/repository.py", line 141, in is_valid_repository
    GitRepository(path)
  File "/mnt/hgfs/marcink-shared/workspace/rhodecode-enterprise-ce/rhodecode/lib/vcs/backends/git/repository.py", line 68, in __init__
    self.path, self.config, with_wire=with_wire)
  File "/mnt/hgfs/marcink-shared/workspace/rhodecode-enterprise-ce/rhodecode/lib/vcs/client.py", line 185, in __call__
    path, config, remote_proxy=self._proxy_factory(),
  File "/mnt/hgfs/marcink-shared/workspace/rhodecode-enterprise-ce/rhodecode/lib/vcs/client.py", line 211, in __call__
    return self.getProxy(request)
  File "/mnt/hgfs/marcink-shared/workspace/rhodecode-enterprise-ce/rhodecode/lib/vcs/client.py", line 230, in getProxy
    request.add_finished_callback(self._returnProxy)
AttributeError: 'NoneType' object has no attribute 'add_finished_callback'

History

#1 Updated by Martin Bornhold about 3 years ago

  • Target version set to v4.2
  • Status changed from New to In Progress

The problem is that we are now creating pyro proxy objects for the request context we are in. But if we are not in a request context (e.g. in tests or invoke tasks) it should be fine to return new pyro proxy objects on each call. Then we are using one-time proxies if outside of a request context and cached proxies if inside a request context.

#2 Updated by Martin Bornhold about 3 years ago

  • Status changed from In Progress to Resolved

#3 Updated by Martin Bornhold about 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF