#2867 closed defect (invalid)
error: nothing to repeat
Reported by: | Owned by: | Radek Bartoň | |
---|---|---|---|
Priority: | normal | Component: | DiscussionPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
How to Reproduce
While doing a POST operation on /discussion/1/2
, Trac issued an internal error.
Whenever submitting a post for my site it does this. It's fine on previews though. I noticed that it redirects after the post submission to the same preview location. It can't preview a post, since we're not making one, can we? So there in lies the issue...
I'm not up on Python, otherwise I'd fix it myself rather than trouble you.
Request parameters:
{'__EDITOR__1': u'textarea', '__FORM_TOKEN': u'a14c32e19f8f823123f04d6d', 'author': u'lordsauron', 'body': u"A base, [source:Ty/Chequebook/trunk/src/myshell2.d dummy GUI] now works. If you compile it with the DMD Snapshot you should get a blank (but present!) GUI. I have yet to write in all the action events and things that make button clicks do things, but there's a GUI there.", 'discussion_action': u'post-add', 'forum': u'1', 'message': u'6', 'submit': u'Submit changes', 'topic': u'2'}
User Agent was: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5
System Information
Trac | 0.11dev-r6811
|
Python | 2.5.1 (r251:54863, Mar 18 2008, 19:18:55) [GCC 3.3.5 (Debian 1:3.3.5-13)]
|
setuptools | 0.6c7
|
MySQL | server: "5.0.24a-standard-log", client: "5.0.16", thread-safe: 1
|
MySQLdb | 1.2.2
|
Genshi | 0.5dev-r818
|
Pygments | 0.9
|
Subversion | 1.4.6 (r28521)
|
jQuery: | 1.2.3
|
Python Traceback
Traceback (most recent call last): File "/home/.marie/fsdev/packages/lib/python2.5/site-packages/Trac-0.11dev_r6811-py2.5.egg/trac/web/main.py", line 417, in _dispatch_request dispatcher.dispatch(req) File "/home/.marie/fsdev/packages/lib/python2.5/site-packages/Trac-0.11dev_r6811-py2.5.egg/trac/web/main.py", line 197, in dispatch resp = chosen_handler.process_request(req) File "build/bdist.linux-i686/egg/tracdiscussion/core.py", line 77, in process_request return api.process_discussion(context) + (None,) File "build/bdist.linux-i686/egg/tracdiscussion/api.py", line 48, in process_discussion is_moderator) File "build/bdist.linux-i686/egg/tracdiscussion/api.py", line 679, in _do_action notifier = DiscussionNotifyEmail(self.env) File "build/bdist.linux-i686/egg/tracdiscussion/notification.py", line 25, in __init__ NotifyEmail.__init__(self, env) File "/home/.marie/fsdev/packages/lib/python2.5/site-packages/Trac-0.11dev_r6811-py2.5.egg/trac/notification.py", line 181, in __init__ self.shortaddr_re = re.compile(r'%s$' % addrfmt) File "/home/fsdev/packages/lib/python2.5/re.py", line 180, in compile return _compile(pattern, flags) File "/home/fsdev/packages/lib/python2.5/re.py", line 233, in _compile raise error, v # invalid expression error: nothing to repeat
I should add that my site runs using CGI, not mod_python or any of those other lovely tools that only the expensive web hosts get.
Attachments (1)
Change History (7)
comment:1 Changed 17 years ago by
Status: | new → assigned |
---|
comment:2 Changed 17 years ago by
Well, I think that the problem is that when a user previews before posting, it sends him to a url like discussion/1/1/#preview When the user finally submits the post, it does submit the post, but it tries to redirect the user to the last visited URL, which is the same one, still with the #preview part. If I take that error page and cut the #preview part out of the URL, it works fine. I'm guessing that it's an issue with my running it through CGI, a necessary evil because of my two-bit web host. Normally I'd run it through mod_python like the rest of the civilized world.
I would supply some logs, but a cronjob wiped it so there's nothing there.
comment:3 Changed 17 years ago by
I studied related Trac code and noticed that error is caused when compiling regular expression for correct e-mail format checking during notification. Possible source of problems could be setting of admit_domains
configuration variable. Why this occurs only when request contains #preview is mystery to me. In mod_python or tracd environment reuqested path doesn't contain anchors (they are visible only for user agent) but I don't know how's that in CGI. But to support your supposition try to apply attached patch if it helps. If it does it won't be the explanation. If it doesn't I would appreciate to see debug log to know exactly what course of actions is causing the error. Seeing trac.ini configuration about notification may help too.
comment:4 Changed 17 years ago by
Here's the error (which repeated after the patch) in the log file:
2008-04-08 12:20:29,971 Trac[main] ERROR: nothing to repeat Traceback (most recent call last): File "/home/.marie/fsdev/packages/lib/python2.5/site-packages/Trac-0.11dev_r6811-py2.5.egg/trac/web/main.py", line 417, in _dispatch_request dispatcher.dispatch(req) File "/home/.marie/fsdev/packages/lib/python2.5/site-packages/Trac-0.11dev_r6811-py2.5.egg/trac/web/main.py", line 197, in dispatch resp = chosen_handler.process_request(req) File "build/bdist.linux-i686/egg/tracdiscussion/core.py", line 78, in process_request return api.process_discussion(context) + (None,) File "build/bdist.linux-i686/egg/tracdiscussion/api.py", line 48, in process_discussion is_moderator) File "build/bdist.linux-i686/egg/tracdiscussion/api.py", line 680, in _do_action notifier = DiscussionNotifyEmail(self.env) File "build/bdist.linux-i686/egg/tracdiscussion/notification.py", line 25, in __init__ NotifyEmail.__init__(self, env) File "/home/.marie/fsdev/packages/lib/python2.5/site-packages/Trac-0.11dev_r6811-py2.5.egg/trac/notification.py", line 181, in __init__ self.shortaddr_re = re.compile(r'%s$' % addrfmt) File "/home/fsdev/packages/lib/python2.5/re.py", line 180, in compile return _compile(pattern, flags) File "/home/fsdev/packages/lib/python2.5/re.py", line 233, in _compile raise error, v # invalid expression error: nothing to repeat 2008-04-08 12:21:21,510 Trac[loader] WARNING: Skipping "spamfilter.ip_blacklist = tracspamfilter.filters.ip_blacklist [dns]": ("dnspython>=1.3.5" not found) 2008-04-08 12:21:21,553 Trac[loader] WARNING: Skipping "spamfilter.captcha.image = tracspamfilter.captcha.image [pil]": ("pil" not found) 2008-04-08 12:21:21,595 Trac[loader] WARNING: Skipping "spamfilter.bayes = tracspamfilter.filters.bayes [spambayes]": ("spambayes" not found) 2008-04-08 12:21:21,964 Trac[loader] WARNING: Skipping "trac.mimeview.txtl = trac.mimeview.txtl [textile]": ("textile>=2.0" not found) 2008-04-08 12:21:23,993 Trac[main] WARNING: 404 Not Found (No handler matched request to /internal_error.html)
And here's the trac.ini
# -*- coding: utf-8 -*- [account-manager] password_file = /not/giving/out password_format = htpasswd password_store = HtPasswdStore [attachment] max_size = 25000000 render_unsafe_content = false [browser] color_scale = True downloadable_paths = /trunk, /branches/*, /tags/* hide_properties = svk:merge intermediate_color = intermediate_point = newest_color = (255, 136, 136) oldest_color = (136, 136, 255) oneliner_properties = trac:summary render_unsafe_content = false wiki_properties = trac:description [changeset] max_diff_bytes = 10000000 max_diff_files = 0 wiki_format_messages = true [components] acct_mgr.* = enabled blackmagic.blackmagic.tickettweaks = disabled ctxtnavadd.web_ui.ctxtnavaddmodule = enabled goodies.entities.entities = enabled goodies.mailto.mailtolink = enabled goodies.mozilla.mozilla = enabled goodies.smileys.smileys = enabled goodies.symbols.symbols = enabled goodies.unc_paths.uncpathlink = enabled htgroups.htgroups.htgroups = enabled iniadmin.iniadmin.iniadminplugin = enabled irclogs.irclogsplugin = disabled pydotorgtheme.theme.pydotorgtheme = enabled svnauthz.svnauthz.svnauthzplugin = enabled themeengine.admin.themeadminmodule = enabled themeengine.api.themeenginesystem = enabled themeengine.web_ui.themeenginemodule = enabled trac.web.auth.loginmodule = disabled tracdiscussion.admin.discussionwebadmin = enabled tracdiscussion.api.discussionapi = enabled tracdiscussion.core.discussioncore = enabled tracdiscussion.init.discussioninit = enabled tracdiscussion.search.discussionsearch = enabled tracdiscussion.timeline.discussiontimeline = enabled tracdiscussion.wiki.discussionwiki = enabled trachacks.web_ui.trachacksaccountmanager = disabled trachacks.web_ui.trachackshandler = disabled tracspamfilter.adapters.attachmentfilteradapter = enabled tracspamfilter.adapters.ticketfilteradapter = enabled tracspamfilter.adapters.wikifilteradapter = enabled tracspamfilter.admin.akismetadminpageprovider = enabled tracspamfilter.admin.bayesadminpageprovider = enabled tracspamfilter.admin.spamfilteradminpageprovider = enabled tracspamfilter.api.filtersystem = enabled tracspamfilter.captcha.api.captchasystem = disabled tracspamfilter.filters.akismet.akismetfilterstrategy = enabled tracspamfilter.filters.extlinks.externallinksfilterstrategy = enabled tracspamfilter.filters.ip_throttle.ipthrottlefilterstrategy = enabled tracspamfilter.filters.regex.regexfilterstrategy = enabled tracspamfilter.filters.session.sessionfilterstrategy = enabled tractags.api.tagsystem = disabled tractags.macros.listtaggedmacro = disabled tractags.macros.tagcloudmacro = disabled tractags.model.tagmodelprovider = disabled tractags.ticket.tickettagprovider = disabled tractags.web_ui.tagrequesthandler = disabled tractags.web_ui.tagtemplateprovider = disabled tractags.wiki.tagwikisyntaxprovider = disabled tractags.wiki.wikitaginterface = disabled tractags.wiki.wikitagprovider = disabled tractoc.macro.tocmacro = enabled tractrail.trail.userbasemodule = enabled tracusermanager.account.admin_um.accountusermanagerpanel = enabled tracusermanager.admin.usermanagementadminpage = enabled tracusermanager.api.environmentfixknownusers = enabled tracusermanager.api.sessionattributeprovider = enabled tracusermanager.api.sessionuserstore = enabled tracusermanager.api.usermanager = enabled tracusermanager.permissions.admin_um.permissionusermanagerpanel = enabled tracusermanager.profile.admin.userprofilefieldsadminpage = enabled tracusermanager.profile.admin_um.userprofileusermanagerpanel = enabled tracusermanager.profile.api.userprofilemanager = enabled tracusermanager.profile.macros.defaultuserprofileslistcellcontributor = enabled tracusermanager.profile.macros.teamrostermacro = enabled tracusermanager.profile.macros.userprofileslistmacro = enabled tracusermanager.profile.prefs.userprofilemodule = enabled tracwysiwyg.templateprovider = enabled tracwysiwyg.wysiwygwikifilter = enabled webadmin.* = enabled [discussion] title = Forum [header_logo] alt = height = -1 link = http://www.fsdev.net/ src = /site/logo.png width = -1 [inherit] plugins_dir = templates_dir = [logging] log_file = trac_log log_level = INFO log_type = file [milestone] stats_provider = DefaultTicketGroupStatsProvider [mimeviewer] enscript_modes = text/x-dylan:dylan:4 enscript_path = enscript max_preview_size = 262144 mime_map = text/x-dylan:dylan,text/x-dsrc:d:di,text/x-idl:ice,text/x-ada:ads:adb php_path = php pygments_default_style = borland pygments_modes = tab_width = 4 [notification] admit_domains = * always_notify_owner = true always_notify_reporter = true always_notify_updater = true ignore_domains = mime_encoding = base64 smtp_always_bcc = smtp_always_cc = smtp_default_domain = fsdev.net smtp_enabled = false smtp_from = noreply@fsdev.net smtp_from_name = noreply smtp_password = not_giving_out smtp_port = 25 smtp_replyto = dev@null.com smtp_server = mail.fsdev.net smtp_subject_prefix = __default__ smtp_user = retro-bot@dev.fsdev.net ticket_subject_template = $prefix #$ticket.id: $summary use_public_cc = false use_short_addr = false use_tls = false [project] admin = descr = Firestorm Development Group International footer = © 2008 Firestorm Development Group International. All Rights Reserved. icon = /site/favicon.ico name = FSDEV url = [query] default_anonymous_query = status!=closed&cc~=$USER default_query = status!=closed&owner=$USER [revisionlog] default_log_limit = 100 [roadmap] stats_provider = DefaultTicketGroupStatsProvider [search] min_query_length = 3 [spam-filter] akismet_api_key = not_telling_you akismet_api_url = rest.akismet.com/1.1/ extlinks_karma = 2 ip_throttle_karma = 3 logging_enabled = true min_karma = 3 purge_age = 7 regex_karma = 5 session_karma = 9 [svn] branches = trunk,branches/* tags = tags/* [theme] theme = PyDotOrg [ticket] default_component = default_milestone = default_priority = normal default_resolution = fixed default_type = defect default_version = max_description_size = 262144 preserve_newlines = default restrict_owner = true workflow = ConfigurableTicketWorkflow [ticket-workflow] accept = new,assigned,accepted,reopened -> accepted accept.operations = set_owner_to_self accept.permissions = TICKET_MODIFY leave = * -> * leave.default = 1 leave.operations = leave_status reassign = new,assigned,accepted,reopened -> assigned reassign.operations = set_owner reassign.permissions = TICKET_MODIFY reopen = closed -> reopened reopen.operations = del_resolution reopen.permissions = TICKET_CREATE resolve = new,assigned,accepted,reopened -> closed resolve.operations = set_resolution resolve.permissions = TICKET_MODIFY [timeline] abbreviated_messages = true changeset_collapse_events = false changeset_long_messages = false changeset_show_files = 0 default_daysback = 30 max_daysback = 90 newticket_formatter = oneliner ticket_show_details = false [trac] authz_file = /not/giving/out authz_module_name = auto_reload = False base_url = http://www.fsdev.net/ check_auth_ip = true database = mysql://rails:ipitythefool@obfuscated.fsdev.net/testing default_charset = iso-8859-15 htdocs_location = ignore_auth_case = false mainnav = wiki,discussion,timeline,roadmap,browser,revtree,tickets,newticket,downloader,search metanav = login,logout,prefs,help,about permission_policies = DefaultPermissionPolicy, LegacyAttachmentPolicy permission_store = DefaultPermissionStore repository_dir = /not/giving/out repository_type = svn show_email_addresses = false timeout = 20 use_base_url_for_redirect = false [um_profile-custom] chat-icq = text chat-icq.cols = chat-icq.internal = 0 chat-icq.label = ICQ chat-icq.order = 3 chat-icq.rows = chat-irc = text chat-irc.cols = chat-irc.internal = 0 chat-irc.label = IRC chat-irc.order = 2 chat-irc.rows = chat-msn = text chat-msn.cols = chat-msn.internal = 0 chat-msn.label = MSN chat-msn.order = 1 chat-msn.rows = chat-xfire = text chat-xfire.cols = chat-xfire.internal = 0 chat-xfire.label = XFire chat-xfire.order = 4 chat-xfire.rows = contact-phone = text contact-phone.cols = contact-phone.internal = 1 contact-phone.label = Phone # contact-phone.order = 5 contact-phone.rows = kw = select kw.cols = kw.internal = 1 kw.label = Kingdom Wars kw.options = true|false kw.order = 6 kw.rows = kw.value = false [wiki] ignore_missing_pages = false render_unsafe_content = false split_page_names = false
I have sanitized the trac.ini to remove sensitive information (passwords, important file locations, etc).
comment:5 Changed 17 years ago by
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
Here we are. You have admit_domains = *
and it is directly passed to regular expression which is uncomplete then. According to documentation it can be only list.
Comma-separated list of domains that should be considered as valid for email addresses (such as localdomain)
comment:6 Changed 17 years ago by
Ah... sorry for the trouble, I didn't know that.
Thank you so much for the help! If I knew enough Python I'd try to repay you with some code help, but all I'd do is make a big mess so I'll stay away.
I'm not sure that I understand how did you evoke this error. Did you used standard web UI or some kind of script?
Following the backtrace told me error is somewhere between recieving request and creating NotifyEmail object from environment which are Trac internals. So either plugin messed up an environment somehow or it's problem of Trac itself or usage.
Are there some more informations in log?