Note that there are some explanatory texts on larger screens.

plurals
  1. PODjango: Bad group name
    primarykey
    data
    text
    <p>I faced an error on "bad group name".</p> <p>Here is the code:</p> <pre><code>for qitem in q['display']: if qitem['type'] == 1: for keyword in keywordTags.split('|'): p = re.compile('^' + keyword + '$') newstring='' for word in qitem['value'].split(): if word[-1:] == ',': word = word[0:len(word)-1] newstring += (p.sub('&lt;b&gt;'+word+'&lt;/b&gt;', word) + ', ') else: newstring += (p.sub('&lt;b&gt;'+word+'&lt;/b&gt;', word) + ' ') qitem['value']=newstring </code></pre> <p>And here's the error:</p> <blockquote> <p>error at /result/1/ bad group name Request Method: GET Django Version: 1.4.1 Exception Type: error Exception Value: bad group name Exception Location: C:\Python27\lib\re.py in _compile_repl, line 257 Python Executable: C:\Python27\python.exe Python Version: 2.7.3 Python Path: ['D:\ExamPapers', 'C:\Windows\SYSTEM32\python27.zip', 'C:\Python27\DLLs', 'C:\Python27\lib', 'C:\Python27\lib\plat-win', 'C:\Python27\lib\lib-tk', 'C:\Python27', 'C:\Python27\lib\site-packages'] Server time: Sun,3 Mar 2013 15:31:05 +0800 </p> <p>Traceback Switch to copy-and-paste view</p> <p>C:\Python27\lib\site-packages\django\core\handlers\base.py in get_response response = callback(request, *callback_args, **callback_kwargs) ... ▶ Local vars ? D:\ExamPapers\views.py in result newstring += (p.sub('<b>'+word+'</b>', word) + ' ') ... ▶ Local vars</p> </blockquote> <p>In summary, the error is at:</p> <pre><code>newstring += (p.sub('&lt;b&gt;'+word+'&lt;/b&gt;', word) + ' ') </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload