On Tuesday, December 6, 2016 at 12:02:52 AM UTC-8, Mingxing Tian wrote:
>
>
>
> 在 2016年12月6日星期二 UTC+8下午2:43:30,RjOllos写道:
>>
>>
>>
>> On Monday, December 5, 2016 at 10:12:48 PM UTC-8, Mingxing Tian wrote:
>>>
>>>
>>>
>>> 在 2016年12月6日星期二 UTC+8下午2:08:00,RjOllos写道:
>>>>
>>>>
>>>>
>>>> On Monday, December 5, 2016 at 9:57:24 PM UTC-8, Mingxing Tian wrote:
>>>>>
>>>>> I still get some mistakes, because I do not understand the Python 
>>>>> language, so it is difficult to analyze what is the problem!
>>>>>
>>>>>
>>>>> 2016-12-06 13:48:08,061 Trac[loader] ERROR: Skipping 
>>>>> "trac.mimeview.txtl = trac.mimeview.txtl [textile]":
>>>>> Traceback (most recent call last):
>>>>>   File "/usr/lib/python2.6/site-packages/trac/loader.py", line 68, in 
>>>>> _load_eggs
>>>>>     entry.load(require=True)
>>>>>   File "/usr/lib/python2.6/site-packages/pkg_resources/__init__.py", 
>>>>> line 2287, in load
>>>>>     return self.resolve()
>>>>>   File "/usr/lib/python2.6/site-packages/pkg_resources/__init__.py", 
>>>>> line 2293, in resolve
>>>>>     module = __import__(self.module_name, fromlist=['__name__'], 
>>>>> level=0)
>>>>>   File "/usr/lib/python2.6/site-packages/trac/mimeview/txtl.py", line 
>>>>> 21, in <module>
>>>>>     import textile
>>>>> ImportError: No module named textile
>>>>>
>>>>> 2016-12-06 13:48:09,211 Trac[main] ERROR: Exception caught while 
>>>>> post-processing request:
>>>>> Traceback (most recent call last):
>>>>>   File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 285, 
>>>>> in dispatch
>>>>>     self._post_process_request(req)
>>>>>   File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 447, 
>>>>> in _post_process_request
>>>>>     f.post_process_request(req, *(None,)*extra_arg_count)
>>>>>   File "build/bdist.linux-x86_64/egg/tracwysiwyg/__init__.py", line 
>>>>> 49, in post_process_request
>>>>>     add_script_data(req, {'_tracwysiwyg': options})
>>>>>   File "/usr/lib/python2.6/site-packages/trac/web/chrome.py", line 
>>>>> 186, in add_script_data
>>>>>     script_data = req.chrome.setdefault('script_data', {})
>>>>>   File "/usr/lib/python2.6/site-packages/trac/web/api.py", line 492, 
>>>>> in __getattr__
>>>>>     value = self.callbacks[name](self)
>>>>>   File "/usr/lib/python2.6/site-packages/trac/web/chrome.py", line 
>>>>> 800, in prepare_request
>>>>>     if req.locale is not None and str(req.locale) != 'en_US':
>>>>>   File "/usr/lib/python2.6/site-packages/trac/web/api.py", line 492, 
>>>>> in __getattr__
>>>>>     value = self.callbacks[name](self)
>>>>>   File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 358, 
>>>>> in _get_locale
>>>>>     preferred = req.session.get('language')
>>>>>   File "/usr/lib/python2.6/site-packages/trac/web/api.py", line 492, 
>>>>> in __getattr__
>>>>>     value = self.callbacks[name](self)
>>>>>   File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 350, 
>>>>> in _get_session
>>>>>     return Session(self.env, req)
>>>>>   File "/usr/lib/python2.6/site-packages/trac/web/session.py", line 
>>>>> 242, in __init__
>>>>>     if req.authname == 'anonymous':
>>>>>   File "/usr/lib/python2.6/site-packages/trac/web/api.py", line 492, 
>>>>> in __getattr__
>>>>>     value = self.callbacks[name](self)
>>>>>   File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 172, 
>>>>> in authenticate
>>>>>     authname = authenticator.authenticate(req)
>>>>>   File "build/bdist.linux-x86_64/egg/acct_mgr/util.py", line 81, in 
>>>>> wrap
>>>>>     return func(self, *args, **kwds)
>>>>>   File "build/bdist.linux-x86_64/egg/acct_mgr/web_ui.py", line 422, in 
>>>>> authenticate
>>>>>     return auth.LoginModule.authenticate(self, req)
>>>>>   File "/usr/lib/python2.6/site-packages/trac/web/auth.py", line 97, 
>>>>> in authenticate
>>>>>     req.incookie['trac_auth'])
>>>>>   File "build/bdist.linux-x86_64/egg/acct_mgr/web_ui.py", line 491, in 
>>>>> _get_name_for_cookie
>>>>>     db = self.env.get_db_cnx()
>>>>> AttributeError: 'Environment' object has no attribute 'get_db_cnx'
>>>>> 2016-12-06 13:48:09,212 Trac[main] ERROR: Internal Server Error: 
>>>>> <RequestWithSession "GET '/ticket/508'">, referrer '
>>>>> http://trac.idouzi.com/trac/idouzi/timeline?smp_update=filter&smp_projects=%E6%95%B0%E6%8D%AE%E4%B8%AD%E5%BF%83&tag_query=&from=2016-12-05&daysback=8&authors=tianmingxing&ticket=on&changeset=on&repo-=on&repo-Idouzi_Mall=on&repo-Idouzi_Server=on&milestone=on&wiki=on&tags=on&update=%E6%9B%B4%E6%96%B0%E7%BB%93%E6%9E%9C
>>>>> '
>>>>> Traceback (most recent call last):
>>>>>   File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 613, 
>>>>> in _dispatch_request
>>>>>     dispatcher.dispatch(req)
>>>>>   File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 220, 
>>>>> in dispatch
>>>>>     chosen_handler = self._pre_process_request(req, chosen_handler)
>>>>>   File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 422, 
>>>>> in _pre_process_request
>>>>>     chosen_handler = filter_.pre_process_request(req, chosen_handler)
>>>>>   File "build/bdist.linux-x86_64/egg/acct_mgr/api.py", line 478, in 
>>>>> pre_process_request
>>>>>     if not req.session.authenticated or \
>>>>>   File "/usr/lib/python2.6/site-packages/trac/web/api.py", line 492, 
>>>>> in __getattr__
>>>>>     value = self.callbacks[name](self)
>>>>>   File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 350, 
>>>>> in _get_session
>>>>>     return Session(self.env, req)
>>>>>   File "/usr/lib/python2.6/site-packages/trac/web/session.py", line 
>>>>> 242, in __init__
>>>>>     if req.authname == 'anonymous':
>>>>>   File "/usr/lib/python2.6/site-packages/trac/web/api.py", line 492, 
>>>>> in __getattr__
>>>>>     value = self.callbacks[name](self)
>>>>>   File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 172, 
>>>>> in authenticate
>>>>>     authname = authenticator.authenticate(req)
>>>>>   File "build/bdist.linux-x86_64/egg/acct_mgr/util.py", line 81, in 
>>>>> wrap
>>>>>     return func(self, *args, **kwds)
>>>>>   File "build/bdist.linux-x86_64/egg/acct_mgr/web_ui.py", line 422, in 
>>>>> authenticate
>>>>>     return auth.LoginModule.authenticate(self, req)
>>>>>   File "/usr/lib/python2.6/site-packages/trac/web/auth.py", line 97, 
>>>>> in authenticate
>>>>>     req.incookie['trac_auth'])
>>>>>   File "build/bdist.linux-x86_64/egg/acct_mgr/web_ui.py", line 491, in 
>>>>> _get_name_for_cookie
>>>>>     db = self.env.get_db_cnx()
>>>>> AttributeError: 'Environment' object has no attribute 'get_db_cnx'
>>>>>
>>>>
>>>>
>>>> First, please avoid top-posting. Please reply at the bottom of the 
>>>> message so that we can maintain a thread with logical ordering.
>>>>
>>>> A correction to what I said earlier: you need to install TracTags 
>>>> 0.9dev, from the trunk of that project.
>>>>
>>>> You can determine which plugin is causing the issue by looking at the 
>>>> traceback. Read it in reverse order, and you will see the "acct_mgr" as 
>>>> the 
>>>> last line in the traceback. The problem is with AccountManagerPlugin. The 
>>>> relevant ticket is #12569, and it hasn't been fixed yet.
>>>> https://trac-hacks.org/ticket/12569
>>>>
>>>> You should read TracUpgrade. It lists plugins that can be removed from 
>>>> your installation.
>>>> https://trac.edgewall.org/wiki/TracUpgrade
>>>>
>>>> Make a list of the plugins you have installed. Compare that list with 
>>>> those tagged 1.2, and you can check off those plugins as being compatible 
>>>> with Trac 1.2.
>>>> https://trac-hacks.org/tags/1.2
>>>>
>>>> Next reply here with the list of plugins that you could not determine 
>>>> are compatible with Trac 1.2. We'll look at that list and let you know 
>>>> which won't work with Trac 1.2. You have a large number of plugins 
>>>> installed and you upgrade path is going to be difficult.
>>>>
>>>> I suggest you restore from backup and return to Trac 1.0.13. Setup a 
>>>> staging site for testing your 1.2 upgrade; it's going to take some effort 
>>>> and time to get your site upgraded to Trac 1.2. Note - you need to restore 
>>>> from backup. You can't just reinstall Trac 1.0.13 because the database has 
>>>> been upgraded.
>>>>
>>>> - Ryan
>>>>  
>>>>
>>>
>>>
>>> Thank you for your advice and guidance, I did not have to backup before 
>>> upgrade, this is really a bad habit. So I can only take the time to upgrade 
>>> now. There is no regret medicine to eat.
>>>
>>
>> #11915 has been resolved, so you can install from the AccountManger trunk 
>> to fix the most recent issue you reported.
>> https://trac-hacks.org/ticket/11915
>>
>> - Ryan 
>>
>
>
> I updated the code on the main trunk, and now only the error, and then 
> trouble you to help give some advice!
>
> 2016-12-06 15:58:05,092 Trac[main] ERROR: Exception caught while 
> post-processing request:
> Traceback (most recent call last):
>   File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 285, in 
> dispatch
>     self._post_process_request(req)
>   File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 447, in 
> _post_process_request
>     f.post_process_request(req, *(None,)*extra_arg_count)
>   File "build/bdist.linux-x86_64/egg/tracsectionedit/web_ui.py", line 57, 
> in post_process_request
>     and 'WIKI_MODIFY' in req.perm:
>   File "/usr/lib/python2.6/site-packages/trac/perm.py", line 586, in 
> has_permission
>     return self._has_permission(action, resource)
>   File "/usr/lib/python2.6/site-packages/trac/perm.py", line 600, in 
> _has_permission
>     check_permission(action, perm.username, resource, perm)
>   File "/usr/lib/python2.6/site-packages/trac/perm.py", line 495, in 
> check_permission
>     for policy in self.policies:
>   File "/usr/lib/python2.6/site-packages/trac/config.py", line 900, in 
> __get__
>     for impl in self.xtnpt.extensions(instance):
>   File "/usr/lib/python2.6/site-packages/trac/core.py", line 82, in 
> extensions
>     components = [component.compmgr[cls] for cls in classes]
>   File "/usr/lib/python2.6/site-packages/trac/core.py", line 212, in 
> __getitem__
>     component = cls(self)
>   File "/usr/lib/python2.6/site-packages/trac/core.py", line 144, in 
> __call__
>     self.__init__()
>   File "/usr/lib/python2.6/site-packages/tracopt/perm/authz_policy.py", 
> line 136, in __init__
>     raise ConfigurationError()
> ConfigurationError: Look in the Trac log for more information.
>
>
>
>

On the previous line in the log file you should find:

The `[authz_policy] authz_file` configuration option in trac.ini is empty 
or not defined. 

Are you using AuthzPolicy? If you are using it, it will be listed in [trac] 
permission_policies. Please let me know the value of [trac] 
permission_policies for your environment. It seems you have not specified 
[authz_policy] authz_file. Do you recall setting the value?

In upgrade step db36.py, the value of [authz_policy] authz_file was 
modified. The original value should be found in 
$env/conf/trac.ini.db36.bak. If the value is not found in trac.ini, please 
let me know the value found in the trac.ini.db36.bak file. There could be a 
problem with that upgrade step.

https://trac.edgewall.org/browser/tags/trac-1.2/trac/upgrades/db36.py

- Ryan

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to