Problem registering at bug tracker

Hi!

I have made a keymap for swedish macbooks, and would like to make a ticket to add this to the list of default keyboard layouts.

When I try to register at dev.haiku-os.org (after figuring out the correct case for “Haiku”) I stumble upon this bug:

Cannot find an implementation of the `ICaptchaMethod` interface named `ImageCaptcha`. Please check that the Component is enabled or update the option `[spam-filter] captcha` in trac.ini.

Is this an error in the bug tracker configuration?

Good morning. It was updated to a newer version yesterday, so it is likely you are running into a new issue. Let me look into it.

Looks like there is a missing python module. I will try to fix that.

The missing modules have been added to the deployment and they have been deployed as an emergency fix. Could you try it again?

Hold that for now, I am seeing new errors in the log.

2024-03-18 07:39:48,767 Trac[main] ERROR: [10.244.1.190] Internal Server Error: <RequestWithSession "GET '/captcha/image'">, referrer 'https://dev.haiku-os.org/captcha'
Traceback (most recent call last):
  File "/opt/pypy/lib/pypy3.10/site-packages/trac/web/main.py", line 609, in dispatch_request
    dispatcher.dispatch(req)
  File "/opt/pypy/lib/pypy3.10/site-packages/trac/web/main.py", line 301, in dispatch
    raise e
  File "/opt/pypy/lib/pypy3.10/site-packages/trac/web/main.py", line 247, in dispatch
    resp = chosen_handler.process_request(req)
  File "/var/trac/dev.haiku-os.org/plugins/TracSpamFilter-1.5.1-py3.10.egg/tracspamfilter/captcha/image.py", line 75, in process_request
    self.gen_captcha(image, req.session['captcha_expected'], font,
  File "/var/trac/dev.haiku-os.org/plugins/TracSpamFilter-1.5.1-py3.10.egg/tracspamfilter/captcha/image.py", line 112, in gen_captcha
    dim = font.getsize(text)
AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
2 Likes

got that too while trying to register to report a DDR boot issue


<!DOCTYPE html>
<html lang="en-US">   <head>
    <!-- # block head (placeholder in theme.html) -->
        <!-- # block head (content inherited from layout.html) -->
    <title>
      Internal Error
          – Haiku

    </title>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <!--[if IE]><script>
        if (/^#__msie303:/.test(window.location.hash))
        window.location.replace(window.location.hash.replace(/^#__msie303:/, '#'));
        </script><![endif]-->

    <link rel="start"  href="/wiki" />
    <link rel="search"  href="/search" />
    <link rel="help"  href="/wiki/TracGuide" />
    <link rel="stylesheet"  href="/chrome/common/css/trac.css" type="text/css" />
    <link rel="stylesheet"  href="/chrome/common/css/jquery-ui/jquery-ui.css" type="text/css" />
    <link rel="stylesheet"  href="/chrome/common/css/jquery-ui-addons.css" type="text/css" />
    <link rel="stylesheet"  href="/chrome/common/css/code.css" type="text/css" />
    <link rel="icon"  href="/chrome/site/favicon.ico" type="image/x-icon" />
    <noscript>
      <style>
        .trac-noscript { display: none !important }
      </style>     </noscript>
    <link type="application/opensearchdescription+xml" rel="search"
          href="/search/opensearch"
          title="Search Haiku"/>
    <script>
      var jquery_ui={"ampm":true,"date_format":"M d, yy","day_names":{"abbreviated":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"narrow":["S","M","T","W","T","F","S"],"wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},"default_timezone":0,"first_week_day":0,"month_names":{"abbreviated":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"wide":["January","February","March","April","May","June","July","August","September","October","November","December"]},"period_names":{"am":["AM","AM"],"pm":["PM","PM"]},"show_timezone":false,"time_format":"h:mm:ss\u202fTT","timepicker_separator":", ","timezone_iso8601":false,"timezone_list":null};
    </script>
    <script src="/chrome/common/js/jquery.js"></script>
    <script src="/chrome/common/js/babel.js"></script>
    <script src="/chrome/common/js/trac.js"></script>
    <script src="/chrome/common/js/search.js"></script>
    <script src="/chrome/common/js/folding.js"></script>
    <script src="/chrome/common/js/jquery-ui.js"></script>
    <script src="/chrome/common/js/jquery-ui-addons.js"></script>
    <script src="/chrome/common/js/jquery-ui-i18n.js"></script>
    <script>
      jQuery(function($) {
        $(".trac-autofocus").focus();
        $(".trac-target-new").attr("target", "_blank");
        if ($.ui) { /* is jquery-ui added? */
          $(".trac-datepicker:not([readonly])")
            .prop("autocomplete", "off").datepicker();
          // Input current date when today is pressed.
          var _goToToday = $.datepicker._gotoToday;
          $.datepicker._gotoToday = function(id) {
            _goToToday.call(this, id);
            this._selectDate(id)
          };
          $(".trac-datetimepicker:not([readonly])")
            .prop("autocomplete", "off").datetimepicker();
        }
        $(".trac-disable").disableSubmit(".trac-disable-determinant");
        setTimeout(function() { $(".trac-scroll").scrollToTop() }, 1);
        $(".trac-disable-on-submit").disableOnSubmit();
      });
    </script>
    <!--   # include 'site_head.html' (layout.html) -->
<link rel="stylesheet" href="/chrome/site/haiku.css" />    <!--   end of site_head.html -->
    <!-- # endblock head (content inherited from layout.html) -->


    <script>
      jQuery(function($) {
        $("form.newticket textarea").each(function() {
          $(this).val($(this).val()
                             .replace(/#USER_AGENT#/m, navigator.userAgent)
                             .replace(/#JQUERY#/m, $().jquery)
                             .replace(/#JQUERYUI#/m, $.ui.version)
                             .replace(/#JQUERYTP#/m, $.timepicker.version));
        });
      });
    </script>
    <!-- # endblock head (placeholder in theme.html) -->
  </head> 
  <body>
    <!-- # block body (content inherited from theme.html) -->
    <!--   # include 'site_header.html' (theme.html) -->
    <!--   end of site_header.html -->

    <div id="banner">
      <div id="header">
        <a id="logo"
           href="http://www.haiku-os.org">
          <img  alt="Haiku" src="/chrome/site/logo.png" /></a>


      </div>
      <form id="search" action="/search" method="get">
        <div>
          <label for="proj-search">Search:</label>
          <input type="text" id="proj-search" name="q" size="18"
                  value="" />
          <input type="submit" value="Search" />
        </div>
      </form>
          <div id="metanav" class="nav">
      <ul><li  class="first"><a href="/login">Login</a></li><li ><a href="/wiki/TracGuide">Help/Guide</a></li><li ><a href="/about">About Trac</a></li><li ><a href="/prefs">Preferences</a></li><li ><a href="/register">Register</a></li><li  class="last"><a href="/reset_password">Forgot your password?</a></li></ul>
    </div>

    </div>
        <div id="mainnav" class="nav">
      <ul><li  class="first"><a href="/wiki">Wiki</a></li><li ><a href="/timeline">Timeline</a></li><li ><a href="/roadmap">Roadmap</a></li><li ><a href="https://cgit.haiku-os.org/">Browse Source</a></li><li ><a href="/query">View Tickets</a></li><li  class="last"><a href="/search">Search</a></li></ul>
    </div>


    <div id="main"
         >
      <div id="ctxtnav" class="nav">
        <h2>Context Navigation</h2>
        <hr />
      </div>

      

      

      <!-- # block content (placeholder in theme.html) -->
    <div id="content" class="error">
      <h1>Oops…</h1>
      <div class="message">
        <strong>Trac detected an internal error:</strong>
        <pre>TypeError: &#39;float&#39; object is not subscriptable (key 0)</pre>
      </div>
      <p>
There was an internal error in Trac. It is recommended that you notify your local         Trac administrator
 with the information needed to reproduce the issue.      </p>
      <form class="newticket" method="get"
            action="/newticket#">
        <p>
To that end, you could       <input type="hidden" name="reporter" value="anonymous" />
      <input type="hidden" name="summary" value="TypeError: &#39;float&#39; object is not subscriptable (key 0)" />
      <textarea name="description" rows="3" cols="10">==== How to Reproduce

While doing a GET operation on `/captcha/image`, Trac issued an internal error.

&#39;&#39;(please provide additional details here)&#39;&#39;

Request parameters:
{{{
{}
}}}

User agent: `#USER_AGENT#`

==== System Information
&#39;&#39;System information not available&#39;&#39;

==== Enabled Plugins
&#39;&#39;Plugin information not available&#39;&#39;

==== Interface Customization
&#39;&#39;Interface customization information not available&#39;&#39;

==== Python Traceback
{{{
Traceback (most recent call last):
  File &#34;/opt/pypy/lib/pypy3.10/site-packages/trac/web/main.py&#34;, line 609, in dispatch_request
    dispatcher.dispatch(req)
  File &#34;/opt/pypy/lib/pypy3.10/site-packages/trac/web/main.py&#34;, line 301, in dispatch
    raise e
  File &#34;/opt/pypy/lib/pypy3.10/site-packages/trac/web/main.py&#34;, line 247, in dispatch
    resp = chosen_handler.process_request(req)
  File &#34;/var/trac/dev.haiku-os.org/plugins/TracSpamFilter-1.5.1-py3.10.egg/tracspamfilter/captcha/image.py&#34;, line 75, in process_request
    self.gen_captcha(image, req.session[&#39;captcha_expected&#39;], font,
  File &#34;/var/trac/dev.haiku-os.org/plugins/TracSpamFilter-1.5.1-py3.10.egg/tracspamfilter/captcha/image.py&#34;, line 114, in gen_captcha
    im = Image.new(&#39;RGB&#39;, (dim[0] + 5, dim[1] + 5), bgcolor)
TypeError: &#39;float&#39; object is not subscriptable (key 0)
}}}</textarea>
      <span class="inlinebuttons">
        <input type="submit" name="create" value="Create" />
      </span>
 a ticket.        </p>
      </form>
      <p>The action that triggered the error was:</p>
      <pre>GET: /captcha/image</pre>

      <p>
        <a href="/wiki/TracGuide">TracGuide</a>
 &mdash; The Trac User and Administration Guide      </p>
    </div>
        <!-- # block content (content inherited from layout.html) -->
    <script type="text/javascript">
      jQuery("body").addClass("trac-has-js");
    </script>
    <!-- # endblock content (content inherited from layout.html) -->

      <!-- # endblock content (placeholder in theme.html) -->
    </div>

    <div id="footer"><hr/>
      <a id="tracpowered" href="https://trac.edgewall.org/"
         ><img src="/chrome/common/trac_logo_mini.png" height="30"
               width="107" alt="Trac Powered"/></a>
      <p class="left">
Powered by         <a href="/about"><strong>Trac 1.6</strong></a>
        <br />
 By         <a href="http://www.edgewall.org/">Edgewall Software</a>
.      </p>
      <p class="right">Visit the Haiku project at<br /><a href="https://www.haiku-os.org/">https://www.haiku-os.org/</a></p>
    </div>
    <!--   # include 'site_footer.html' (theme.html) -->
    <!--   end of site_footer.html -->
    <!-- # endblock body (content inherited from theme.html) -->
  </body> </html>

@adumerat @torb Please try again, the captchas are appearing for me.

2 Likes

It works=)

Thanks for your help and have a nice week!

1 Like

top - thank’s !