title: AttributeError: 'thread._local' object has no attribute 'browser'
body: <p>I am stuck on an AttributeError using lettuce in python.</p>
  
  <p>I'm trying to follow the lettuce=0.2.19 documentation no the website <a href="http://lettuce.it/reference/terrain.html#reference-terrain" rel="nofollow">http://lettuce.it/reference/terrain.html#reference-terrain</a> but cannot figure out what I'm doing wrong.</p>
  
  <p>I am using virtualenv to start a clean environment.
  I want to add a very stupid feature for testing.</p>
  
  <p>the organisation of the directory is</p>
  
  <pre><code>features
      |_terrain.py
      |_ user_reauth.feature
      |_ user_steps.py
  </code></pre>
  
  <p>Here is my terrain.py file:</p>
  
  <pre><code>from lettuce import before, after, world
  from lettuce.django import django_url
  from selenium import selenium
  
  @before.harvest
  def prepare_browser_driver(variables):
      if variables.get('run_server', False) is True:
          world.browser = selenium('localhost', 4444, '*firefox', django_url('/'))
          world.browser.start()
  
  @after.harvest
  def shutdown_browser_driver(results):
      world.browser.stop()
  </code></pre>
  
  <p>and the user_steps.py file:</p>
  
  <pre><code>from lettuce import world, step
  from lettuce.django import django_url
  
  @step(u'User is already authenticated with username "(.*)')
  def user_is(step, username):
      assert 1==1
  
  @step(u'I go to the "(.*)" URL')
  def i_go_to_the_url(step, url):
      world.response = world.browser.visit(django_url(url))
  
  @step(u'I should see "(.*)"')
  def i_should_see(step, text):
      assert text in world.browser.html
  </code></pre>
  
  <p>When using the following command:</p>
  
  <pre><code>python manage.py harvest --settings=my_settings dir/features/user_reauth.feature
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>line 13, in shutdown_browser_driver
      world.browser.stop()
  AttributeError: 'thread._local' object has no attribute 'browser'
  </code></pre>