Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8762451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:32:01+00:00 2026-06-13T15:32:01+00:00

I’ve been trying to get a basic set of Lettuce tests up and running

  • 0

I’ve been trying to get a basic set of Lettuce tests up and running in a django project, but I’ve run into a few problems.

I followed the example tutorial on the lettuce website, but I keep getting the following error when I run python manage.py harvest:

Feature: Rocking with lettuce and django               #apps/my_app/features/index.feature:1

  Scenario: Simple Hello World                         # apps/my_app/features/index.feature:3
    Given I access the url "/admin"                    # apps/my_app/features/index-steps.py:12
    Given I access the url "/admin"                    # apps/my_app/features/index-steps.py:12
    Traceback (most recent call last):
      File "/home/myhome/.virtualenvs/my_env/lib/python2.7/site-packages/lettuce/core.py", line 141, in __call__
        ret = self.function(self.step, *args, **kw)
      File "/home/myhome/code/my_app/apps/my_app/features/index-steps.py", line 14, in access_url
        world.dom = html.fromstring(response.content)
      File "/home/myhome/.virtualenvs/my_env/lib/python2.7/site-packages/lxml/html/__init__.py", line 634, in fromstring
        doc = document_fromstring(html, parser=parser, base_url=base_url, **kw)
      File "/home/myhome/.virtualenvs/my_env/lib/python2.7/site-packages/lxml/html/__init__.py", line 532, in document_fromstring
        value = etree.fromstring(html, parser, **kw)
      File "lxml.etree.pyx", line 2756, in lxml.etree.fromstring (src/lxml/lxml.etree.c:54726)
      File "parser.pxi", line 1578, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:82843)
      File "parser.pxi", line 1457, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:81641)
      File "parser.pxi", line 965, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:78311)
      File "parser.pxi", line 569, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:74567)
      File "parser.pxi", line 650, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:75458)
      File "parser.pxi", line 601, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:74958)
    XMLSyntaxError: None
    Then I see the header "Log in | Django site admin" # apps/my_app/features/index-steps.py:17
    Then I see the header "Log in | Django site admin" # apps/my_app/features/index-steps.py:17

1 feature (0 passed)
1 scenario (0 passed)
2 steps (1 failed, 1 skipped, 0 passed)

I have the following installed in my virtual environment:

Django==1.4.1
MySQL-python==1.2.3
South==0.7.6
Werkzeug==0.8.3
boto==2.6.0
cssselect==0.7.1
django-extensions==0.9
django-nose==1.1
django-storages==1.1.5
django-tastypie==0.9.11
fuzzywuzzy==0.1
lettuce==0.2.10
lxml==2.3.5
mimeparse==0.1.3
mock==1.0.0
nose==1.2.1
python-dateutil==1.5
selenium==2.25.0
sure==1.0.6
wsgiref==0.1.2

Is this a bug, or have I made some mistake somewhere? I would have thought the example would have covered it…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T15:32:02+00:00Added an answer on June 13, 2026 at 3:32 pm

    Apparently, the error was a red herring. I was getting XMLSyntaxError because the response from the URL was empty (the URL I was checking was missing a trailing slash, in this case).

    So, should anyone come across this problem, always verify that your own code works before blaming someone else’s.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am currently running into a problem where an element is coming back from
I have a jquery bug and I've been looking for hours now, I can't
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I would like to run a str_replace or preg_replace which looks for certain words

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.