Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

407
Views
ValueError at /createuser/ invalid literal for int() with base 10: 'satya'

i am trying to create user . first i am checking if user exists or not but for first time it gives me this error:

ValueError at /createuser/

invalid literal for int() with base 10: 'satya'

and when i refresh this page works fine. my code:

for i in range(0, len(username)):
        try:
            print(username[i])
            user = User.objects.get(username = username[i])
        except User.DoesNotExist:
            user = User.objects.create_user(username=username[i], email=email[i], password=password[i],first_name=firstname[i],last_name=lastname[i] )
            group.user_set.add(username[i])
        except ValueError:
            pass

thanks in advance!!

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I think you need to do

group.user_set.add(user.id)
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!