Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updatecombo() takes exactly 2 arguments (1 given) #102

Open
sergey-zakharov opened this issue Apr 25, 2013 · 1 comment
Open

updatecombo() takes exactly 2 arguments (1 given) #102

sergey-zakharov opened this issue Apr 25, 2013 · 1 comment

Comments

@sergey-zakharov
Copy link

I encountered the same problem in the current build with an example from the site!
http://www.dajaxproject.com/fullform/

my code
http://pastie.org/7721130

error:
Internal Server Error: /dajaxice/teacher_constructor.updatecombo/
Traceback (most recent call last):
File "/usr/local/lib/python3.2/dist-packages/django/core/handlers/base.py", line 115, in get_response
response = callback(request, _callback_args, *_callback_kwargs)
File "/usr/local/lib/python3.2/dist-packages/django/views/generic/base.py", line 68, in view
return self.dispatch(request, _args, *_kwargs)
File "/usr/local/lib/python3.2/dist-packages/dajaxice/views.py", line 52, in dispatch
response = function.call(request, *_data)
File "/usr/local/lib/python3.2/dist-packages/dajaxice/core/Dajaxice.py", line 18, in call
return self.function(_args, **kwargs)
TypeError: updatecombo() takes exactly 2 arguments (1 given)

but
LOCALE_INDEPENDENT_PATHS = (
compile('^/dajaxice/'),
)
doesn't help
File "/usr/local/lib/python3.2/dist-packages/django/conf/init.py", line 47, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python3.2/dist-packages/django/conf/init.py", line 130, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/local/lib/python3.2/dist-packages/django/utils/importlib.py", line 35, in import_module
import(name)
File "/media/D/projects/InnoPract/workrepo/edplatform/edplatform/settings.py", line 170, in
compile('^/dajaxice/'),
TypeError: Required argument 'filename' (pos 2) not found

And such problem appers not only with this example!
python3, django 5, the last dajax

Please, explain why it happens and what to do!

@progval
Copy link

progval commented Jul 28, 2013

I found this issue googling for "TypeError: Required argument 'filename' (pos 2) not found", when calling compile() outside a Django project, ie. with the compile() function from Python's builtin functions.
You should probably fix your import to use Django's compile instead of the default one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants