cursor() takes no arguments (1 given)
See original GitHub issueI have problem with cursor method from the compiler class.
I am using Django==1.5.5
with django-salesforce==0.2.0.1
. When I try insert object to the SalesForce I am receiving an error:
Traceback:
File "/python2.7/site-packages/django/core/handlers/base.py" in get_response
115. response = callback(request, *callback_args, **callback_kwargs)
File "/python2.7/site-packages/django/views/generic/base.py" in view
68. return self.dispatch(request, *args, **kwargs)
File "/python2.7/site-packages/django/views/generic/base.py" in dispatch
86. return handler(request, *args, **kwargs)
File "/ptoject-src/products/models.py" in create_from_request
157. return self.model.objects.create(**kwargs)
File "/python2.7/site-packages/django/db/models/manager.py" in create
149. return self.get_query_set().create(**kwargs)
File "/python2.7/site-packages/django/db/models/query.py" in create
416. obj.save(force_insert=True, using=self.db)
File "/ptoject-src/salesforce_api/utils.py" in save
13. return super(InsertWebsiteOwnerMixin, self).save(*args, **kwargs)
File "/python2.7/site-packages/django/db/models/base.py" in save
546. force_update=force_update, update_fields=update_fields)
File "/python2.7/site-packages/django/db/models/base.py" in save_base
591. update_fields=update_fields)
File "/python2.7/site-packages/django/db/models/base.py" in save_base
650. result = manager._insert([self], fields=fields, return_id=update_pk, using=using, raw=raw)
File "/python2.7/site-packages/django/db/models/manager.py" in _insert
215. return insert_query(self.model, objs, fields, **kwargs)
File "/python2.7/site-packages/django/db/models/query.py" in insert_query
1675. return query.get_compiler(using=using).execute_sql(return_id)
File "/python2.7/site-packages/salesforce/backend/compiler.py" in execute_sql
181. cursor = self.connection.cursor(query=self.query)
Exception Type: TypeError at /object/status/
Exception Value: cursor() takes no arguments (1 given)
I notice this code should be evaluates only for Django 1.4 (if(DJANGO_14):
).
Issue Analytics
- State:
- Created 10 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Why do I get a TypeError that says "takes no arguments (1 ...
Python implicitly passes the object to method calls, but you need to explicitly declare the parameter for it. This is customarily named self ......
Read more >How To Fix Python TypeError - "Class Takes No Arguments (1 ...
This is a post to explain How To Fix Python TypeError – “Class Takes No Arguments (1 Given)”. This error occurs due to...
Read more >python tutorial: TypeError values takes no arguments 1 given
python tutorial: #codefix #python #python_tutorial#TypeError: values() takes no arguments ( 1 given ): In this video i have shared why ...
Read more >drive_car() takes no arguments (1 given) - Codecademy
drive_car() takes no arguments (1 given). Idk why but the code isnt showing right, here it is though… the problem is its not...
Read more >TypeError: execute() takes at least 2 arguments (1 given)
Don't see why this should be reopened when no feedback or new information is provided. Closing again. Modify Ticket. Change Properties ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This has been fixed approximately one year ago. Django debug toolbar is now supported completely, including Explain command and tests. #248
Yeah, I really hated having to give cursor() the query object, but I really think there’s a good reason for it. Any patches or ideas for patches on this issue are welcome, of course 😉