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

  • SEARCH
  • Home
  • 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 8999877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:14:18+00:00 2026-06-16T00:14:18+00:00

I am getting an error invalid literal for int() with base 10: sharat and

  • 0

I am getting an error invalid literal for int() with base 10: sharat and am not sure how to fix it. Any advice?

friend = 'sharat'
user_playlists = Everything.objects.filter(profile = friend).values('playlist').distinct()

class Everything(models.Model):
    profile = models.ForeignKey(User)
    playlist = models.CharField('Playlist', max_length = 2000, null=True, blank=True)
    platform = models.CharField('Platform', max_length = 2000, null=True, blank=True)
    video = models.CharField('VideoID', max_length = 2000, null=True, blank=True)
    video_title = models.CharField('Title of Video', max_length = 2000, null=True, blank=True)
    def __unicode__(self):
        return u'%s %s %s %s %s' % (self.profile, self.playlist, self.platform, self.video, self.video_title)
  • 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-16T00:14:18+00:00Added an answer on June 16, 2026 at 12:14 am

    You first need to get the user by that name and then filter by that user, rather than filtering by the username. Alternatively (and probably better), you can have Django do that itself in a more efficient way, probably involving a join:

    user_playlists = Everything.objects.filter(profile__username=friend).values('playlist').distinct()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting this error: invalid literal for int() with base 10: 'social' when I
not sure what I'm missing here, but i keep getting the error. SQLSTATE[HY093]: Invalid
I'm getting the error: Invalid column name 'Reserved' I'm not sure where in my
I'm getting this error: Error: invalid conversion from int (*)(const char*, fuse_file_info*) to int
After compiling the program I am getting below error invalid operands of types int
I am getting error: Invalid argument supplied for foreach() This is my class for
I'm getting the error Invalid argument supplied for foreach() even though the array being
i am getting an error: invalid lvalue in assignment. this is the only error
I am getting the following error : Invalid postback or callback argument. Event validation
My code is getting the following error: free(): invalid next size (fast) My code:

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.