压缩wirecloud时出现语法错误

SyntaxError compressing wirecloud

我正在尝试在另一个 VM 运行ning Ubuntu Server 14.04.1 上使用 PostgreSQL 在 CentOS 6.6 上设置自己的 wirecloud 实例。因此,我遵循了 this guide,在我来到 django 配置之前,它工作得很好。

每次我尝试 运行 压缩语句时,我都会收到以下错误:

Compressing... /usr/local/venv/lib/python2.6/site-packages/scss/types.py:1065: FutureWarning: String got a bytes type 'platform' -- this will no longer be supported in pyScss 2.0
  .format(value)
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/venv/lib/python2.6/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/usr/local/venv/lib/python2.6/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/venv/lib/python2.6/site-packages/django/core/management/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/venv/lib/python2.6/site-packages/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/usr/local/venv/lib/python2.6/site-packages/django/core/management/base.py", line 415, in handle
    return self.handle_noargs(**options)
  File "/usr/local/venv/lib/python2.6/site-packages/compressor/management/commands/compress.py", line 281, in handle_noargs
    self.compress(sys.stdout, **options)
  File "/usr/local/venv/lib/python2.6/site-packages/compressor/management/commands/compress.py", line 228, in compress
    rendered = parser.render_nodelist(template, context, node)
  File "/usr/local/venv/lib/python2.6/site-packages/compressor/offline/django.py", line 123, in render_nodelist
    return node.nodelist.render(context)
  File "/usr/local/venv/lib/python2.6/site-packages/django/template/base.py", line 840, in render
    bit = self.render_node(node, context)
  File "/usr/local/venv/lib/python2.6/site-packages/django/template/base.py", line 854, in render_node
    return node.render(context)
  File "/usr/local/venv/lib/python2.6/site-packages/django/template/base.py", line 1196, in render
    _dict = func(*resolved_args, **resolved_kwargs)
  File "/usr/local/venv/lib/python2.6/site-packages/wirecloud/platform/templatetags/wirecloudtags.py", line 46, in wirecloud_bootstrap
    endpoints = get_wirecloud_ajax_endpoints(view)
  File "/usr/local/venv/lib/python2.6/site-packages/wirecloud/platform/plugins.py", line 199, in get_wirecloud_ajax_endpoints
    endpoints += plugin.get_ajax_endpoints(view)
  File "/usr/local/venv/lib/python2.6/site-packages/wirecloud/platform/core/plugins.py", line 550, in get_ajax_endpoints
    {'id': 'LOGIN_VIEW', 'url': build_url_template('login')},
  File "/usr/local/venv/lib/python2.6/site-packages/wirecloud/platform/plugins.py", line 411, in build_url_template
    possibilities = resolver.reverse_dict.getlist(view)
  File "/usr/local/venv/lib/python2.6/site-packages/django/core/urlresolvers.py", line 315, in reverse_dict
    self._populate()
  File "/usr/local/venv/lib/python2.6/site-packages/django/core/urlresolvers.py", line 267, in _populate
    for pattern in reversed(self.url_patterns):
  File "/usr/local/venv/lib/python2.6/site-packages/django/core/urlresolvers.py", line 365, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/usr/local/venv/lib/python2.6/site-packages/django/core/urlresolvers.py", line 360, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/usr/local/venv/lib/python2.6/site-packages/django/utils/importlib.py", line 40, in import_module
    __import__(name)
  File "/opt/wc/imt/imt/urls.py", line 7, in <module>
    import wirecloud.platform.urls
  File "/usr/local/venv/lib/python2.6/site-packages/wirecloud/platform/urls.py", line 24, in <module>
    from wirecloud.platform import views
  File "/usr/local/venv/lib/python2.6/site-packages/wirecloud/platform/views.py", line 42, in <module>
    from wirecloud.platform.workspace.utils import get_workspace_list
  File "/usr/local/venv/lib/python2.6/site-packages/wirecloud/platform/workspace/utils.py", line 519
    data_ret['preferences'] = {preference['name']: cache_manager.get_variable_data(iwidget, preference['name']) for preference in iwidget_info['preferences']}
                                                                                                                  ^
SyntaxError: invalid syntax

在此方面的帮助将不胜感激!

提前致谢。

data_ret['preferences'] = {preference['name']: cache_manager.get_variable_data(iwidget, preference['name']) for preference in iwidget_info['preferences']}

这是词典理解。它们是在 Python 2.7 中添加的。您是 运行 Python 2.6,因此出现语法错误。