title: pyramid pserve pviews P* re.compile syntax error
body: <p>I used to launch the command <code>pserve --reload development.ini</code> in my vagrant box to launch a pyramid server locally. The command was working until the last few days.  </p>
  
  <p>However, I now have a syntax error preventing me from launching pserve with or <em>without</em> conf file.</p>
  
  <pre><code>(py32)vagrant.vm bin # pserve
  Traceback (most recent call last):
    File "/var/virtualenv/py32/bin/pserve", line 9, in &lt;module&gt;
  load_entry_point('pyramid==1.5.1', 'console_scripts', 'pserve')()
    File "/var/virtualenv/py32/lib/python3.2/site-packages/pkg_resources/__init__.py", line 519, in load_entry_point
  return get_distribution(dist).load_entry_point(group, name)
    File "/var/virtualenv/py32/lib/python3.2/site-packages/pkg_resources/__init__.py", line 2630, in load_entry_point
  return ep.load()
    File "/var/virtualenv/py32/lib/python3.2/site-packages/pkg_resources/__init__.py", line 2310, in load
  return self.resolve()
    File "/var/virtualenv/py32/lib/python3.2/site-packages/pkg_resources/__init__.py", line 2316, in resolve
  module = __import__(self.module_name, fromlist=['__name__'], level=0)
     File "/var/virtualenv/py32/lib/python3.2/site-packages/pyramid/scripts/pserve.py", line 31, in &lt;module&gt;
  from pyramid.paster import setup_logging
    File "/var/virtualenv/py32/lib/python3.2/site-packages/pyramid/paster.py", line 10, in &lt;module&gt;
  from pyramid.scripting import prepare
    File "/var/virtualenv/py32/lib/python3.2/site-packages/pyramid/scripting.py", line 1, in &lt;module&gt;
  from pyramid.config import global_registries
  File "/var/virtualenv/py32/lib/python3.2/site-packages/pyramid/config/__init__.py", line 9, in &lt;module&gt;
  from webob.exc import WSGIHTTPException as WebobWSGIHTTPException
    File "/var/virtualenv/py32/lib/python3.2/site-packages/webob/__init__.py", line 2, in &lt;module&gt;
  from webob.request import *
    File "/var/virtualenv/py32/lib/python3.2/site-packages/webob/request.py", line 10, in &lt;module&gt;
  import simplejson as json
    File "/var/virtualenv/py32/lib/python3.2/site-packages/simplejson/__init__.py", line 113, in &lt;module&gt;
  from .encoder import JSONEncoder, JSONEncoderForHTML
    File "/var/virtualenv/py32/lib/python3.2/site-packages/simplejson/encoder.py", line 22
  ESCAPE = re.compile(u'[\\x00-\\x1f\\\\"\\b\\f\\n\\r\\t\u2028\u2029]')
                                                                     ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>I use python 3.2.3 in this virtualenv</p>
  
  <p>pviews and proutes give the same error</p>
  
  <p>Any help appreciated :)</p>
  
  <p>Regards</p>
  
  <p>==========================</p>
  
  <p>Thanks to Steve Piercy I uninstalled simplejson and pserve now works launched alone! Thanks again.</p>
  
  <p>However, when I launch pserve development.ini, I now have another error:</p>
  
  <pre><code>(py32)vagrant.vm app # pserve --reload development.ini
  Starting subprocess with file monitor
  Traceback (most recent call last):
    File "/var/virtualenv/py32/bin/pserve", line 9, in &lt;module&gt;
  load_entry_point('pyramid==1.5.1', 'console_scripts', 'pserve')()
    File "/var/virtualenv/py32/lib/python3.2/site-packages/pyramid/scripts/pserve.py", line 51, in main
  return command.run()
    File "/var/virtualenv/py32/lib/python3.2/site-packages/pyramid/scripts/pserve.py", line 316, in run
  global_conf=vars)
    File "/var/virtualenv/py32/lib/python3.2/site-packages/pyramid/scripts/pserve.py", line 340, in loadapp
  return loadapp(app_spec, name=name, relative_to=relative_to, **kw)
    File "/var/virtualenv/py32/lib/python3.2/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
  return loadobj(APP, uri, name=name, **kw)
    File "/var/virtualenv/py32/lib/python3.2/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
  return context.create()
    File "/var/virtualenv/py32/lib/python3.2/site-packages/paste/deploy/loadwsgi.py", line 710, in create
  return self.object_type.invoke(self)
    File "/var/virtualenv/py32/lib/python3.2/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
  return fix_call(context.object, context.global_conf, **context.local_conf)
    File "/var/virtualenv/py32/lib/python3.2/site-packages/paste/deploy/util.py", line 56, in fix_call
  val = callable(*args, **kw)
    File "/var/www/app/app/__init__.py", line 63, in main
  request_factory=RequestFactory,
    File "/var/virtualenv/py32/lib/python3.2/site-packages/pyramid/config/__init__.py", line 301, in __init__
  exceptionresponse_view=exceptionresponse_view,
    File "/var/virtualenv/py32/lib/python3.2/site-packages/pyramid/config/__init__.py", line 412, in setup_registry
  self.include(inc)
    File "/var/virtualenv/py32/lib/python3.2/site-packages/pyramid/config/__init__.py", line 755, in include
  c(configurator)
    File "/var/virtualenv/py32/lib/python3.2/site-packages/pyramid_jinja2/__init__.py", line 468, in includeme
  _get_or_build_default_environment(config.registry)
    File "/var/virtualenv/py32/lib/python3.2/site-packages/pyramid_jinja2/__init__.py", line 309, in _get_or_build_default_environment
  filters = parse_config(settings.get('jinja2.filters', ''))
    File "/var/virtualenv/py32/lib/python3.2/site-packages/pyramid_jinja2/__init__.py", line 62, in parse_config
  result[name.strip()] = maybe_import_string(impl)
    File "/var/virtualenv/py32/lib/python3.2/site-packages/pyramid_jinja2/__init__.py", line 44, in maybe_import_string
  return import_string(val.strip())
    File "/var/virtualenv/py32/lib/python3.2/site-packages/jinja2/utils.py", line 213, in import_string
  return getattr(__import__(module, None, None, [obj]), obj)
    File "/var/www/app/app/views/filters.py", line 1, in &lt;module&gt;
  from babel.dates import format_datetime, get_timezone, format_timedelta, format_date, UTC
    File "/usr/lib/python3.2/importlib/_bootstrap.py", line 436, in load_module
  return self._load_module(fullname)
    File "/usr/lib/python3.2/importlib/_bootstrap.py", line 141, in decorated
  return fxn(self, module, *args, **kwargs)
    File "/usr/lib/python3.2/importlib/_bootstrap.py", line 342, in _load_module
  exec(code_object, module.__dict__)
    File "/tmp/pip-build-z2s2e9/babel/babel/__init__.py", line 20, in &lt;module&gt;
    File "/var/virtualenv/py32/lib/python3.2/site-packages/babel/core.py", line 394
  retval += ' (%s)' % u', '.join(details)
                          ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>I tried to uninstall-reinstall babel with no luck.</p>
  
  <p>Thanks for your help!</p>