wooey / Wooey

A Django app that creates automatic web UIs for Python scripts.
http://wooey.readthedocs.org
BSD 3-Clause "New" or "Revised" License
2.13k stars 184 forks source link

Wooey 0.10 - Clone not working #248

Closed pymenow closed 6 years ago

pymenow commented 6 years ago
Request Method: GET

http://website.in/scripts/scanreport/jobs/38 1.9.13 TypeError append() takes exactly one argument (0 given) /opt/anaconda/anaconda3/lib/python3.6/site-packages/wooey/forms/factory.py in get_field, line 109 /opt/anaconda/anaconda3/bin/python 3.6.5 ['/home/adminindia/AMS', '/opt/anaconda/anaconda3/lib/python36.zip', '/opt/anaconda/anaconda3/lib/python3.6', '/opt/anaconda/anaconda3/lib/python3.6/lib-dynload', '/opt/anaconda/anaconda3/lib/python3.6/site-packages', '/home/adminindia/AMS'] Tue, 12 Jun 2018 03:18:18 +0000

pymenow commented 6 years ago

`Environment:

Request Method: GET Request URL: http://website.in/scripts/scanreport/jobs/38

Django Version: 1.9.13 Python Version: 3.6.5 Installed Applications: ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'wooey', 'django_celery_results', 'kombu.transport.filesystem'] Installed Middleware: ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'AMS.middleware.ProcessExceptionMiddleware', 'AMS.middleware.ProcessExceptionMiddleware']

Traceback:

File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/django/core/handlers/base.py" in get_response

  1. response = self.process_exception_by_middleware(e, request)

File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/django/core/handlers/base.py" in get_response

  1. response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/django/views/generic/base.py" in view

  1. return self.dispatch(request, *args, **kwargs)

File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/django/views/generic/base.py" in dispatch

  1. return handler(request, *args, **kwargs)

File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/django/views/generic/detail.py" in get

  1. context = self.get_context_data(object=self.object)

File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/wooey/views/views.py" in get_context_data

  1. pk=self.object.pk

File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/wooey/backend/utils.py" in get_form_groups

  1. return DJ_FORM_FACTORY.get_group_forms(script_version=script_version, pk=pk, initial_dict=initial_dict, render_fn=render_fn)

File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/wooey/forms/factory.py" in get_group_forms

  1. field = self.get_field(param, initial=initial_values)

File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/wooey/forms/factory.py" in get_field

  1. _initial.append()

Exception Type: TypeError at /scripts/scanreport/jobs/38 Exception Value: append() takes exactly one argument (0 given) `

pymenow commented 6 years ago

@Chris7 any feedback on this one .

Chris7 commented 6 years ago

Thanks for your report and sorry for the delay (I need to start making filters in my inbox for github things!). This is definitely a bug. I'm making a test case to ensure this piece of code is covered. In the interrim, if you are comfortable, removing _initial.append() from line 109 should fix it.

pymenow commented 6 years ago

@Chris7 done , with just that change have it working as intended for clone !

Chris7 commented 6 years ago

Fixed via #255. Thanks for reporting.