Opened 7 years ago

Closed 7 years ago

#29050 closed Bug (invalid)

using django-admin startproject give AttributeError

Reported by: Akshay Raj Gollahalli Owned by: nobody
Component: contrib.admin Version: 2.0
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Akshay Raj Gollahalli)

I was trying to create a Django 2 project by using django-admin startproject gives me AttributeError: module 'PIL._webp' has no attribute 'HAVE_WEBPANIM'. The full error is

Traceback (most recent call last):
  File "c:\users\aksha\anaconda3\envs\dj2\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\aksha\anaconda3\envs\dj2\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\aksha\Anaconda3\envs\dj2\Scripts\django-admin.exe\__main__.py", line 9, in <module>
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\django\core\management\__init__.py", line 371, in execute_from_command_line
    utility.execute()
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\django\core\management\__init__.py", line 365, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\django\core\management\base.py", line 288, in run_from_argv
    self.execute(*args, **cmd_options)
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\django\core\management\base.py", line 335, in execute
    output = self.handle(*args, **options)
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\django\core\management\commands\startproject.py", line 20, in handle
    super().handle('project', project_name, target, **options)
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\django\core\management\templates.py", line 117, in handle
    django.setup()
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\django\__init__.py", line 16, in setup
    from django.urls import set_script_prefix
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\django\urls\__init__.py", line 1, in <module>
    from .base import (
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\django\urls\base.py", line 8, in <module>
    from .exceptions import NoReverseMatch, Resolver404
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\django\urls\exceptions.py", line 1, in <module>
    from django.http import Http404
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\django\http\__init__.py", line 5, in <module>
    from django.http.response import (
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\django\http\response.py", line 13, in <module>
    from django.core.serializers.json import DjangoJSONEncoder
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\django\core\serializers\__init__.py", line 23, in <module>
    from django.core.serializers.base import SerializerDoesNotExist
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\django\core\serializers\base.py", line 6, in <module>
    from django.db import models
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\django\db\models\__init__.py", line 3, in <module>
    from django.db.models.aggregates import *  # NOQA
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\django\db\models\aggregates.py", line 5, in <module>
    from django.db.models.expressions import Case, Func, Star, When
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\django\db\models\expressions.py", line 7, in <module>
    from django.db.models import fields
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\django\db\models\fields\__init__.py", line 11, in <module>
    from django import forms
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\django\forms\__init__.py", line 7, in <module>
    from django.forms.fields import *  # NOQA
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\django\forms\fields.py", line 16, in <module>
    from django.core import validators
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\django\core\validators.py", line 511, in <module>
    allowed_extensions=get_available_image_extensions(),
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\django\core\validators.py", line 506, in get_available_image_extensions
    Image.init()
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\PIL\Image.py", line 406, in init
    __import__("PIL.%s" % plugin, globals(), locals(), [])
  File "c:\users\aksha\anaconda3\envs\dj2\lib\site-packages\PIL\WebPImagePlugin.py", line 313, in <module>
    if _webp.HAVE_WEBPANIM:
AttributeError: module 'PIL._webp' has no attribute 'HAVE_WEBPANIM'

It does look like a Pillow error. Any idea what is happening?

Change History (2)

comment:1 by Akshay Raj Gollahalli, 7 years ago

Description: modified (diff)
Summary: using django startproject give AttributeErrorusing django-admin startproject give AttributeError

comment:2 by Ramiro Morales, 7 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top