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 7918749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:36:50+00:00 2026-06-03T15:36:50+00:00

I have this code, but i can’t understand why i get this error: a=

  • 0

I have this code, but i can’t understand why i get this error:

a= name+pw+salt
TypeError: unsupported operand type(s) for +: '_sre.SRE_Match' and '_sre.SRE_Match'

script

class MainHandler(Handler):

    def make_salt(self):
        return ''.join(random.choice(string.ascii_letters) for x in range(5))

    def make_pw_hash(self, name, pw):
        salt = self.make_salt()    
        a= name+pw+salt //problem here

        h = hashlib.sha256(a.encode("UTF8")).hexdigest()
        return '%s|%s' % (h, salt)


    def post(self):
        store_hash_and_salt = self.make_pw_hash("José", "somePass")  
        print (store_hash_and_salt)
  • 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-03T15:36:52+00:00Added an answer on June 3, 2026 at 3:36 pm

    The problem is not there. Somewhere earlier you passed it the RE match results instead of using the group() method to obtain the strings from them.

    (Also, the format of the returned string is incorrect, but that’s not the bug here.)

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

Sidebar

Related Questions

I have this code but I just can't understand it. using System; using System.Collections.Generic;
I have this code, but can't get it all working. I am trying to
i have this code, but i can't understand why var_dump($jobs[0][0]) return Some Director ,
I have this code to update users data, but I can't write the for
I have seen this code documented in the tk docs, but I can't figure
I have searched but can't find why this simple code will fail in Drools
I have the following code to do this, but how can I do it
i have this code but i can't see the action when i click on
i have this code it can go to if(array_key_exists('p',$_POST)) but can't go to if(isset($_POST['p'][$i])
I have been working on this code but I can't find out what is

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.