FTBFS: test failures due to module 'html.parser' has no attribute 'HTMLParseError'

Bug #1480547 reported by Hans Joachim Desserud
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-ghost (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

python-ghost 0.2-1 currently fails to build from source on Ubuntu Wily with the following error messages:

I: pybuild base:170: cd /«PKGBUILDDIR»/.pybuild/pythonX.Y_3.5/build; python3.5 -m unittest discover -v
ghost.ext.django.test (unittest.loader._FailedTest) ... ERROR
tests.ghost.ext.django.test (unittest.loader._FailedTest) ... ERROR

======================================================================
ERROR: ghost.ext.django.test (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: ghost.ext.django.test
Traceback (most recent call last):
  File "/usr/lib/python3.5/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.5/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.5/build/ghost/ext/django/test.py", line 3, in <module>
    from django.test import LiveServerTestCase
  File "/usr/lib/python3/dist-packages/django/test/__init__.py", line 5, in <module>
    from django.test.client import Client, RequestFactory
  File "/usr/lib/python3/dist-packages/django/test/client.py", line 13, in <module>
    from django.core.handlers.base import BaseHandler
  File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 7, in <module>
    from django import http
  File "/usr/lib/python3/dist-packages/django/http/__init__.py", line 4, in <module>
    from django.http.response import (
  File "/usr/lib/python3/dist-packages/django/http/response.py", line 13, in <module>
    from django.core.serializers.json import DjangoJSONEncoder
  File "/usr/lib/python3/dist-packages/django/core/serializers/__init__.py", line 23, in <module>
    from django.core.serializers.base import SerializerDoesNotExist
  File "/usr/lib/python3/dist-packages/django/core/serializers/base.py", line 6, in <module>
    from django.db import models
  File "/usr/lib/python3/dist-packages/django/db/models/__init__.py", line 6, in <module>
    from django.db.models.query import Q, QuerySet, Prefetch # NOQA
  File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 13, in <module>
    from django.db.models.fields import AutoField, Empty
  File "/usr/lib/python3/dist-packages/django/db/models/fields/__init__.py", line 18, in <module>
    from django import forms
  File "/usr/lib/python3/dist-packages/django/forms/__init__.py", line 6, in <module>
    from django.forms.fields import * # NOQA
  File "/usr/lib/python3/dist-packages/django/forms/fields.py", line 18, in <module>
    from django.forms.utils import from_current_timezone, to_current_timezone
  File "/usr/lib/python3/dist-packages/django/forms/utils.py", line 15, in <module>
    from django.utils.html import format_html, format_html_join, escape
  File "/usr/lib/python3/dist-packages/django/utils/html.py", line 16, in <module>
    from .html_parser import HTMLParser, HTMLParseError
  File "/usr/lib/python3/dist-packages/django/utils/html_parser.py", line 12, in <module>
    HTMLParseError = _html_parser.HTMLParseError
AttributeError: module 'html.parser' has no attribute 'HTMLParseError'

======================================================================
ERROR: tests.ghost.ext.django.test (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: tests.ghost.ext.django.test
Traceback (most recent call last):
  File "/usr/lib/python3.5/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.5/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.5/build/tests/ghost/ext/django/test.py", line 3, in <module>
    from django.test import LiveServerTestCase
  File "/usr/lib/python3/dist-packages/django/test/__init__.py", line 5, in <module>
    from django.test.client import Client, RequestFactory
  File "/usr/lib/python3/dist-packages/django/test/client.py", line 13, in <module>
    from django.core.handlers.base import BaseHandler
  File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 7, in <module>
    from django import http
  File "/usr/lib/python3/dist-packages/django/http/__init__.py", line 4, in <module>
    from django.http.response import (
  File "/usr/lib/python3/dist-packages/django/http/response.py", line 13, in <module>
    from django.core.serializers.json import DjangoJSONEncoder
  File "/usr/lib/python3/dist-packages/django/core/serializers/__init__.py", line 23, in <module>
    from django.core.serializers.base import SerializerDoesNotExist
  File "/usr/lib/python3/dist-packages/django/core/serializers/base.py", line 6, in <module>
    from django.db import models
  File "/usr/lib/python3/dist-packages/django/db/models/__init__.py", line 6, in <module>
    from django.db.models.query import Q, QuerySet, Prefetch # NOQA
  File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 13, in <module>
    from django.db.models.fields import AutoField, Empty
  File "/usr/lib/python3/dist-packages/django/db/models/fields/__init__.py", line 18, in <module>
    from django import forms
  File "/usr/lib/python3/dist-packages/django/forms/__init__.py", line 6, in <module>
    from django.forms.fields import * # NOQA
  File "/usr/lib/python3/dist-packages/django/forms/fields.py", line 18, in <module>
    from django.forms.utils import from_current_timezone, to_current_timezone
  File "/usr/lib/python3/dist-packages/django/forms/utils.py", line 15, in <module>
    from django.utils.html import format_html, format_html_join, escape
  File "/usr/lib/python3/dist-packages/django/utils/html.py", line 16, in <module>
    from .html_parser import HTMLParser, HTMLParseError
  File "/usr/lib/python3/dist-packages/django/utils/html_parser.py", line 12, in <module>
    HTMLParseError = _html_parser.HTMLParseError
AttributeError: module 'html.parser' has no attribute 'HTMLParseError'

----------------------------------------------------------------------
Ran 2 tests in 0.001s

FAILED (errors=2)
E: pybuild pybuild:256: test: plugin distutils failed with: exit code=1: cd /«PKGBUILDDIR»/.pybuild/pythonX.Y_3.5/build; python3.5 -m unittest discover -v

(see https://launchpadlibrarian.net/212901791/buildlog_ubuntu-wily-amd64.python-ghost_0.2-1_BUILDING.txt.gz for complete log)

I got the same result when I tried locally on Ubuntu Wily, but I was not able to trigger this issue on Debian unstable. Might be related to the on-going python3.5 changes.

Tags: ftbfs wily
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Looks like this has been fixed since python-ghost 0.2.3-1 built successfully on Ubuntu 16.04.

Changed in python-ghost (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.