Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8240467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:30:05+00:00 2026-06-07T20:30:05+00:00

Consider this function i am using Django along tornadoweb def MeetingRecord(userid,mtngid,mesg): obj = Usage()

  • 0

Consider this function i am using Django along tornadoweb

def MeetingRecord(userid,mtngid,mesg):
    obj =  Usage()
    obj.name = userid
    obj.meeting_id = mtngid
    obj.action = mesg
  #  obj.participantid = participantid
    obj.save()    

here is the model

class Usage(models.Model):
    user = models.ForeignKey('User',related_name = 'usage_user',null = True)
    meeting = models.ForeignKey('Meeting',related_name = 'meeting_usages',null = True)
    participant= models.ForeignKey('Participant',related_name = 'meeting_participant_id',null = True)
    date = models.DateTimeField(auto_now  = True)
    action = models.CharField(max_length = 500)
    miscellaneous = models.CharField(max_length = 500)

I am calling this method from a tornado class like

MeetingRecord(check_user_exist,mtng,mesg)

but i am getting following trackback

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/tornado-2.3-py2.7.egg/tornado/web.py", line 1021, in _execute
    getattr(self, self.request.method.lower())(*args, **kwargs)
  File "tornado_main.py", line 383, in post
    MeetingRecord(check_user_exist,mtng,mesg)
  File "tornado_main.py", line 503, in MeetingRecord
    obj.save()
  File "/usr/local/lib/python2.7/dist-packages/Django-1.4-py2.7.egg/django/db/models/base.py", line 463, in save
    self.save_base(using=using, force_insert=force_insert, force_update=force_update)
  File "/usr/local/lib/python2.7/dist-packages/Django-1.4-py2.7.egg/django/db/models/base.py", line 551, in save_base
    result = manager._insert([self], fields=fields, return_id=update_pk, using=using, raw=raw)
  File "/usr/local/lib/python2.7/dist-packages/Django-1.4-py2.7.egg/django/db/models/manager.py", line 203, in _insert
    return insert_query(self.model, objs, fields, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/Django-1.4-py2.7.egg/django/db/models/query.py", line 1576, in insert_query
    return query.get_compiler(using=using).execute_sql(return_id)
  File "/usr/local/lib/python2.7/dist-packages/Django-1.4-py2.7.egg/django/db/models/sql/compiler.py", line 909, in execute_sql
    for sql, params in self.as_sql():
  File "/usr/local/lib/python2.7/dist-packages/Django-1.4-py2.7.egg/django/db/models/sql/compiler.py", line 872, in as_sql
    for obj in self.query.objs
  File "/usr/local/lib/python2.7/dist-packages/Django-1.4-py2.7.egg/django/db/models/fields/related.py", line 964, in get_db_prep_save
    connection=connection)
  File "/usr/local/lib/python2.7/dist-packages/Django-1.4-py2.7.egg/django/db/models/fields/__init__.py", line 292, in get_db_prep_save
    prepared=False)
  File "/usr/local/lib/python2.7/dist-packages/Django-1.4-py2.7.egg/django/db/models/fields/__init__.py", line 284, in get_db_prep_value
    value = self.get_prep_value(value)
  File "/usr/local/lib/python2.7/dist-packages/Django-1.4-py2.7.egg/django/db/models/fields/__init__.py", line 537, in get_prep_value
    return int(value)
TypeError: int() argument must be a string or a number, not 'Meeting'

I would like to confirm it that userid is the instance of User class and mtngid is the instance of meeting class .

Please help me out why i am getting this error .

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T20:30:06+00:00Added an answer on June 7, 2026 at 8:30 pm

    Just an educated guess: “obj.meeting_id = mtngid” here you’re probably passing a Meeting instance rather than a Meeting id.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

consider this simple function def foo(l=[]): if not l: print List is empty else
Consider: function Shape() { this.name = "Generic"; this.draw = function() { return "Drawing "
Is there an SQL injection possibility even when using mysql_real_escape_string() function? Consider this sample
Does MySQL make use of any indexes when using the ROUND() function? Consider this
Consider this template function: template<typename ReturnT> ReturnT foo(const std::function<ReturnT ()>& fun) { return fun();
Consider this (rather pointless) javascript code: function make_closure() { var x = 123, y
Consider this class: class test { public function __set($n, $v) { echo __set() called\n;
Consider this code: var img = new Image(); img.onload = function() { console.log(this.width); };
Consider the following base code: (function($) { $.fn.myPlugin = function(settings) { return this.each(function() {
Before Consider to have a class and a global function: This is, for example,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.