Cheese Shop Registration error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • alefnula@gmail.com

    #1

    Cheese Shop Registration error

    I tried to register on the Python Cheese Shop, but I constatnly get a
    "GPG key ID is invalid" error.

    I made a new GPG key using kgpg, exported the public key to the key
    server, and copy/pasted the Key ID into the registration form... But it
    doesn't work.

  • Richard Jones

    #2
    Re: Cheese Shop Registration error

    alefnula@gmail. com wrote:
    I tried to register on the Python Cheese Shop, but I constatnly get a
    "GPG key ID is invalid" error.
    >
    I made a new GPG key using kgpg, exported the public key to the key
    server, and copy/pasted the Key ID into the registration form... But it
    doesn't work.
    And the key ID you were trying to paste in was?


    Richard

    Comment

    • alefnula@gmail.com

      #3
      Re: Cheese Shop Registration error

      The Key ID that the kgpg shows. I tried to paste the key returned by
      the quiery on the keyserver. but it also doesn't work. I tried
      everything that has any connection with the key, but everything fails.

      By the way the key is: 6A61E3AD

      Richard Jones wrote:
      alefnula@gmail. com wrote:
      I tried to register on the Python Cheese Shop, but I constatnly get a
      "GPG key ID is invalid" error.

      I made a new GPG key using kgpg, exported the public key to the key
      server, and copy/pasted the Key ID into the registration form... But it
      doesn't work.
      >
      And the key ID you were trying to paste in was?
      >
      >
      Richard

      Comment

      • Richard Jones

        #4
        Re: Cheese Shop Registration error

        alefnula@gmail. com wrote:
        The Key ID that the kgpg shows. I tried to paste the key returned by
        the quiery on the keyserver. but it also doesn't work. I tried
        everything that has any connection with the key, but everything fails.
        >
        By the way the key is: 6A61E3AD
        Here is the code that could generate that error message:

        if len(gpgid) != 8:
        raise FormError, 'GPG key ID is invalid'
        try:
        int(gpgid)
        except ValueError:
        raise FormError, 'GPG key ID is invalid'

        So I suspect there might have been some cut-n-paste error. Check that you've
        not pasted in any whitespace that could confuse the first test.


        Richard

        Comment

        • John Machin

          #5
          Re: Cheese Shop Registration error


          Richard Jones wrote:
          alefnula@gmail. com wrote:
          The Key ID that the kgpg shows. I tried to paste the key returned by
          the quiery on the keyserver. but it also doesn't work. I tried
          everything that has any connection with the key, but everything fails.

          By the way the key is: 6A61E3AD
          >
          Here is the code that could generate that error message:
          >
          if len(gpgid) != 8:
          raise FormError, 'GPG key ID is invalid'
          try:
          int(gpgid)
          | >>int("6A61E3AD ")
          Traceback (most recent call last):
          File "<stdin>", line 1, in ?
          ValueError: invalid literal for int(): 6A61E3AD
          | >>int("6A61E3AD ", 16)
          1784800173

          What am I missing?
          except ValueError:
          raise FormError, 'GPG key ID is invalid'
          >
          So I suspect there might have been some cut-n-paste error. Check that you've
          not pasted in any whitespace that could confuse the first test.
          >
          Cheers,
          John

          Comment

          • Richard Jones

            #6
            Re: Cheese Shop Registration error

            John Machin wrote:
            | >>int("6A61E3AD ")
            Traceback (most recent call last):
            File "<stdin>", line 1, in ?
            ValueError: invalid literal for int(): 6A61E3AD
            | >>int("6A61E3AD ", 16)
            1784800173
            >
            What am I missing?
            Ah, thankyou! I, on the other hand, looked at that code several times and
            saw nothing ;)

            I've fixed the code and it'll be fixed on the server soon (once apache
            restarts itself).


            Richard

            Comment

            • John Machin

              #7
              Re: Cheese Shop Registration error

              Richard Jones wrote:
              John Machin wrote:
              | >>int("6A61E3AD ")
              Traceback (most recent call last):
              File "<stdin>", line 1, in ?
              ValueError: invalid literal for int(): 6A61E3AD
              | >>int("6A61E3AD ", 16)
              1784800173

              What am I missing?
              >
              Ah, thankyou! I, on the other hand, looked at that code several times and
              saw nothing ;)
              >
              I've fixed the code and it'll be fixed on the server soon (once apache
              restarts itself).
              >
              Hi Richard, might be a good idea to spell out the actual criteria
              rather than rely on side effects of int -- e.g. if the input is not
              subject to .strip() somewhere between the keyboard and your code, you
              could get false positives:

              | >>int("123456 7 ",16)
              | 19088743
              | >>int(" 1234567",16)
              | 19088743

              re.match("[A-Fa-f0-9]{8,8}", data.strip()) makes it plain what is
              intended ...

              Cheers,
              John


              Cheers,
              John

              Comment

              • Richard Jones

                #8
                Re: Cheese Shop Registration error

                John Machin wrote:
                re.match("[A-Fa-f0-9]{8,8}", data.strip()) makes it plain what is
                intended ...
                Indeed, thanks.


                Richard

                Comment

                • alefnula@gmail.com

                  #9
                  Re: Cheese Shop Registration error

                  Thank You all! :) I successfully registered and submited my first
                  package :)

                  Richard Jones wrote:
                  John Machin wrote:
                  re.match("[A-Fa-f0-9]{8,8}", data.strip()) makes it plain what is
                  intended ...
                  >
                  Indeed, thanks.
                  >
                  >
                  Richard

                  Comment

                  • alefnula@gmail.com

                    #10
                    Re: Cheese Shop Registration error

                    Thank You all! :) I successfully registered and submited my first
                    package :)

                    Richard Jones wrote:
                    John Machin wrote:
                    re.match("[A-Fa-f0-9]{8,8}", data.strip()) makes it plain what is
                    intended ...
                    >
                    Indeed, thanks.
                    >
                    >
                    Richard

                    Comment

                    Working...