TypeError: __init__() got multiple values for keyword argument 'extensions'

Bug #644907 reported by Simon L'nu
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Softwarefabrica django wiki
New
Undecided
Marco Pantaleoni

Bug Description

Python version: 2.6

OS version: Debian Squeeze; Django 1.2.3; Linux kernel 2.6.34.3

Traceback (most recent call last):
  File "/usr/share/pyshared/django/core/servers/basehttp.py", line 674, in __call__
    return self.application(environ, start_response)
  File "/usr/share/pyshared/django/core/handlers/wsgi.py", line 241, in __call__
    response = self.get_response(request)
  File "/usr/share/pyshared/django/core/handlers/base.py", line 141, in get_response
    return self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/usr/share/pyshared/django/core/handlers/base.py", line 165, in handle_uncaught_exception
    return debug.technical_500_response(request, *exc_info)
  File "/usr/share/pyshared/django/core/handlers/base.py", line 100, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python2.6/dist-packages/softwarefabrica.django.wiki-1.0dev_BZR_r42_panta_elasticworld.org_20091021153851_6ijlut5dkxndxw1h-py2.6.egg/softwarefabrica/django/wiki/views.py", line 126, in v_wikipage_edit
    content.save()
  File "/usr/local/lib/python2.6/dist-packages/softwarefabrica.django.wiki-1.0dev_BZR_r42_panta_elasticworld.org_20091021153851_6ijlut5dkxndxw1h-py2.6.egg/softwarefabrica/django/wiki/models.py", line 238, in save
    (text_html, linked_pages) = wikiparse.wikiparse(self)
  File "/usr/local/lib/python2.6/dist-packages/softwarefabrica.django.wiki-1.0dev_BZR_r42_panta_elasticworld.org_20091021153851_6ijlut5dkxndxw1h-py2.6.egg/softwarefabrica/django/wiki/wikiparse.py", line 376, in wikiparse
    return parser.parse()
  File "/usr/local/lib/python2.6/dist-packages/softwarefabrica.django.wiki-1.0dev_BZR_r42_panta_elasticworld.org_20091021153851_6ijlut5dkxndxw1h-py2.6.egg/softwarefabrica/django/wiki/wikiparse.py", line 63, in parse
    text = self.markup_parse(text)
  File "/usr/local/lib/python2.6/dist-packages/softwarefabrica.django.wiki-1.0dev_BZR_r42_panta_elasticworld.org_20091021153851_6ijlut5dkxndxw1h-py2.6.egg/softwarefabrica/django/wiki/wikiparse.py", line 112, in markup_parse
    safe_mode = safe_mode)
TypeError: __init__() got multiple values for keyword argument 'extensions'

Revision history for this message
Simon L'nu (simon-lnu) wrote :

Hi,

I was adding a new page to a newly created wiki, then I got the above.

Revision history for this message
Marco Pantaleoni (marco-pantaleoni) wrote :

Hi Simon,
thanks for the report.
Which version of markdown do you have installed?

Changed in sf-django-wiki:
assignee: nobody → Marco Pantaleoni (marco-pantaleoni)
Revision history for this message
Simon L'nu (simon-lnu) wrote : Re: [Bug 644907] Re: TypeError: __init__() got multiple values for keyword argument 'extensions'

On 22/09/10 02:23 AM, Marco Pantaleoni wrote:
> Hi Simon,
> thanks for the report.
> Which version of markdown do you have installed?
>

markdown 2.0.3

Revision history for this message
David Zerrenner (dazer017) wrote :

Hi,

I can check that. The bug seems to origin in a faulty call of the markdown constructor. Here's a patch that worked for me (Markdown 2.0.3):

change

            else:
                md = markdown.Markdown(force_unicode(text),
                                       extensions = extensions,
                                       #extension_configs = extension_configs,
                                       #encoding = 'utf8',
                                       safe_mode = safe_mode)
                mdwn = mark_safe(unicode(md))

to:
            else:
                md = markdown.Markdown(# force_unicode(text),
                                       extensions = extensions,
                                       #extension_configs = extension_configs,
                                       #encoding = 'utf8',
                                       safe_mode = safe_mode)
                mdwn = mark_safe(unicode(md.convert(force_unicode(text))))

Revision history for this message
Simon L'nu (simon-lnu) wrote :
Download full text (3.6 KiB)

ok, trying that

On 14 October 2010 11:25, David Zerrenner <email address hidden> wrote:
> Hi,
>
> I can check that. The bug seems to origin in a faulty call of the
> markdown constructor. Here's a patch that worked for me (Markdown
> 2.0.3):
>
> change
>
>            else:
>                md = markdown.Markdown(force_unicode(text),
>                                       extensions = extensions,
>                                       #extension_configs = extension_configs,
>                                       #encoding = 'utf8',
>                                       safe_mode = safe_mode)
>                mdwn = mark_safe(unicode(md))
>
> to:
>            else:
>                md = markdown.Markdown(# force_unicode(text),
>                                       extensions = extensions,
>                                       #extension_configs = extension_configs,
>                                       #encoding = 'utf8',
>                                       safe_mode = safe_mode)
>                mdwn = mark_safe(unicode(md.convert(force_unicode(text))))
>
> --
> TypeError: __init__() got multiple values for keyword argument 'extensions'
> https://bugs.launchpad.net/bugs/644907
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Softwarefabrica django wiki: New
>
> Bug description:
> Python version: 2.6
>
> OS version: Debian Squeeze; Django 1.2.3; Linux kernel 2.6.34.3
>
> Traceback (most recent call last):
>  File "/usr/share/pyshared/django/core/servers/basehttp.py", line 674, in __call__
>    return self.application(environ, start_response)
>  File "/usr/share/pyshared/django/core/handlers/wsgi.py", line 241, in __call__
>    response = self.get_response(request)
>  File "/usr/share/pyshared/django/core/handlers/base.py", line 141, in get_response
>    return self.handle_uncaught_exception(request, resolver, sys.exc_info())
>  File "/usr/share/pyshared/django/core/handlers/base.py", line 165, in handle_uncaught_exception
>    return debug.technical_500_response(request, *exc_info)
>  File "/usr/share/pyshared/django/core/handlers/base.py", line 100, in get_response
>    response = callback(request, *callback_args, **callback_kwargs)
>  File "/usr/local/lib/python2.6/dist-packages/softwarefabrica.django.wiki-1.0dev_BZR_r42_panta_elasticworld.org_20091021153851_6ijlut5dkxndxw1h-py2.6.egg/softwarefabrica/django/wiki/views.py", line 126, in v_wikipage_edit
>    content.save()
>  File "/usr/local/lib/python2.6/dist-packages/softwarefabrica.django.wiki-1.0dev_BZR_r42_panta_elasticworld.org_20091021153851_6ijlut5dkxndxw1h-py2.6.egg/softwarefabrica/django/wiki/models.py", line 238, in save
>    (text_html, linked_pages) = wikiparse.wikiparse(self)
>  File "/usr/local/lib/python2.6/dist-packages/softwarefabrica.django.wiki-1.0dev_BZR_r42_panta_elasticworld.org_20091021153851_6ijlut5dkxndxw1h-py2.6.egg/softwarefabrica/django/wiki/wikiparse.py", line 376, in wikiparse
>    return parser.parse()
>  File "/usr/local/lib/python2.6/dist-packages/softwarefabrica.django.wiki-1.0dev_BZR_r42_panta_elasticworld.org_20091021153851_6ijlut5dkxndxw1h-py2.6.egg/softwarefabrica/django/wiki/wikipar...

Read more...

Revision history for this message
Simon L'nu (simon-lnu) wrote :

On 14 October 2010 11:25, David Zerrenner <email address hidden> wrote:
> Hi,
>
> I can check that. The bug seems to origin in a faulty call of the
> markdown constructor. Here's a patch that worked for me (Markdown
> 2.0.3):
>

oops, a) sorry for top posting, and b) a diff would've been fine with me :)

Revision history for this message
Simon L'nu (simon-lnu) wrote :

On 15 October 2010 03:12, Simon Raven <email address hidden> wrote:
> On 14 October 2010 11:25, David Zerrenner <email address hidden> wrote:
>> Hi,
>>
>> I can check that. The bug seems to origin in a faulty call of the
>> markdown constructor. Here's a patch that worked for me (Markdown
>> 2.0.3):
>>
>
> oops, a) sorry for top posting, and b) a diff would've been fine with me :)
>

thank you :)

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.