[Trac] RuntimeError: headers have already been sent

2020-03-03 Thread Velu Narasimman
Hi team,

I am facing this "headers have already been sent" error in an AJAX 
call. I am not able to fix it. I need your hellp. Would be better if 
someone could explain this issue.

2020-03-04 11:00:45,582 Trac[main] ERROR: [172.24.188.116] Internal Server 
Error: , referrer 
'https://prism30.aspiresys.com/Merlin/admin/pros%20users/users'
Traceback (most recent call last):
  File 
"/usr/local/lib/python2.7/dist-packages/Trac-1.0.15-py2.7.egg/trac/web/main.py"
, line 631, in _dispatch_request
dispatcher.dispatch(req)
  File 
"/usr/local/lib/python2.7/dist-packages/Trac-1.0.15-py2.7.egg/trac/web/main.py"
, line 325, in dispatch
req.send(output, content_type or 'text/html')
  File 
"/usr/local/lib/python2.7/dist-packages/Trac-1.0.15-py2.7.egg/trac/web/api.py"
, line 556, in send
self.end_headers()
  File 
"/usr/local/lib/python2.7/dist-packages/Trac-1.0.15-py2.7.egg/trac/web/api.py"
, line 476, in end_headers
self._write = self._start_response(self._status, self._outheaders)
RuntimeError: headers have already been sent

Above chunk is the error. And below is how I write my json response to the 
AJAX call.
def respond(self, req, data, code=200):
"""Respond to the JSON request by sending the JSON-encoded data 
back."""
json_data = json.dumps(data)
req.send_response(code)
req.send_header('Content-Type', 'application/json')
req.send_header('Content-Length', len(json_data))
req.write(json_data)
raise RequestDone

Not sure if I am missing any code here in this respond method. Welcome your 
suggestions to fix this error.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/91198698-9d02-4167-befd-d488de3d02bf%40googlegroups.com.


Re: [Trac] Re: tracd not working after OS upgrade from rhel 6.10 to 7.6

2020-03-03 Thread Ryan Ollos
On Tue, Mar 3, 2020 at 3:10 PM Jeff McKenna  wrote:

> Hi Ryan,
>
> I tried to explain here that what I found is that the latest release that
> supports all plugins is 1.2.5 from my testing.   Indeed there are plugin
> issues with 1.4.1 which is my point, and why I recommend to others to go
> with 1.2.5 (and save yourself 2 weeks of effort, spend that time on a beach
> instead) until the plugins catchup to 1.4.x
>
> -jeff
>

Understood. I was asking which plugins you are using that aren't compatible
with 1.4.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/CA%2BBGpn90HGij7tXoYjQ%3D3J_%3DF0gSv%3DD9QQtiV%2Bb_O4mvZrirrQ%40mail.gmail.com.


Re: [Trac] Re: tracd not working after OS upgrade from rhel 6.10 to 7.6

2020-03-03 Thread Jeff McKenna
Hi Ryan,

I tried to explain here that what I found is that the latest release that
supports all plugins is 1.2.5 from my testing.   Indeed there are plugin
issues with 1.4.1 which is my point, and why I recommend to others to go
with 1.2.5 (and save yourself 2 weeks of effort, spend that time on a beach
instead) until the plugins catchup to 1.4.x

-jeff






On Tue., Mar. 3, 2020, 2:02 p.m. RjOllos,  wrote:

>
>
> On Tuesday, March 3, 2020 at 9:59:29 AM UTC-8, Jeff McKenna wrote:
>>
>> +1 for Ryan's recommendation for using Trac 1.2.5 now in production.
>>
>> I spent a few weeks of effort trying to upgrade my production Trac
>> instances to 1.4.1 (and of course saw the many users reporting issues with
>> that upgrade, and the response of 'see installation guide'), but in the end
>> I found that the most-recent I could upgrade to and still have all plugins
>> working in production is the 1.2.5 release.
>>
>
> What issues did you see reported with the upgrade? I haven't noticed more
> issues reported that we've encountered with previous major releases, and
> many issues are due to users not following the upgrade procedure describe
> on TracUpgrade.
>
> There are some plugin compatibility issues, but that's separate from the
> Trac upgrade. Which plugins are you using that aren't compatible?
>
>
>> Hope that helps someone else.
>>
>> -jeff
>>
>>
>>
>> On Fri, Feb 28, 2020 at 2:01 PM Ryan Ollos  wrote:
>>
>>>
>>>
>>> On Fri, Feb 28, 2020 at 9:53 AM RjOllos  wrote:
>>>


 On Friday, February 28, 2020 at 9:19:52 AM UTC-8, Rakesh kumar wrote:
>
> HI,
>
> We have upgraded the OS from rhel 6.10 to 7.6.
>
> Not abe to start the trac, Its giving the error while starting the trac
>
> Traceback (most recent call last):
>   File "/bin/tracd", line 5, in 
> from pkg_resources import load_entry_point
>   File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 3007,
> in 
> working_set.require(__requires__)
>   File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 728,
> in require
> needed = self.resolve(parse_requirements(requirements))
>   File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 626,
> in resolve
> raise DistributionNotFound(req)
> pkg_resources.DistributionNotFound: Trac==1.2.2
>
> Thanks,
> Rakesh kumar
>


 Did you install Trac using the RedHat package manager, or using
 easy_install/pip?

 - Ryan

>>>
>>> Either way, you may want to just reinstall
>>> * Uninstall/reinstall using package manager, or
>>> * $ pip uninstall Trac
>>>   $ pip install Trac==1.2.2
>>>
>>> If the latter, consider installing the latest 1.2.x, which is 1.2.5.
>>> https://trac.edgewall.org/wiki/TracDownload#Trac12StableRelease
>>>
>>> - 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/trac-users/CA%2BBGpn88JoLG%3D6bSbLen6YH%3D6rfxzzGY8sBF2DgrTqUxqbdWwg%40mail.gmail.com
>>> 
>>> .
>>>
>> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/trac-users/ccc9b1aa-7917-4108-ae4e-29cd4887b2b8%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/CAPGmwqCcuouabkChmOpZ7nFM4EBdiRE%3D91KbwfvqYAzjA7f_fg%40mail.gmail.com.


[Trac] Re: TracCrystalXTheme not working in 1.4.1

2020-03-03 Thread RjOllos


On Tuesday, March 3, 2020 at 11:26:59 AM UTC-8, Iqbal Ahmad wrote:
>
> Hi,
>
>   I have tried  TracCrystalXTheme in Trac 1.4.1. But as soon as I enable 
> them in the trac.ini, it throws the error as shown in the attached 
> snap-shot.
>
>   Any help is greatly appreciated. Thanks.
>
> Regards,
> Iqbal A
>

The theme was developed for the Genshi templating engine, but Trac 1.4 and 
later use the Jinja2 templating engine. The theme will need to be ported 
from Genshi to Jinja2.

As far as I know, there are no themes developed for Trac 1.4 yet.

- 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/c0e06452-ddbb-4cb7-94af-00137abe0c95%40googlegroups.com.


[Trac] Re: Best way to upgrade Trac data from 0.12.3 to 1.4.0 (latest stable version)?

2020-03-03 Thread RjOllos


On Tuesday, March 3, 2020 at 11:09:38 AM UTC-8, Mr. Smith wrote:
>
> Here's our situation. We currently have a single Trac *0.12.3 *instance 
> hosted by RepositoryHosting.com. We want to self-host, but it's a hassle to 
> install old Trac versions.
>
> *What is the right way to get our data from 0.12.3 upgraded by or for a 
> Trac 1.4 installation?*
>
> I just have no idea here — we don't host the Trac ourselves.
>

Be sure to read through TracUpgrade:
https://trac.edgewall.org/wiki/TracUpgrade

Use the hotcopy trac-admin command to create a backup:
https://trac.edgewall.org/wiki/TracBackup 
Keep a copy of this backup around in case something goes wrong in the next 
steps.

You can use the environment backup created by hotcopy in your new Trac 
installation. I suggest first getting an empty (without your data) Trac 1.4 
installation setup and working, then copying over your environment and 
running the upgrade steps. You'll need to decide which database and 
webserver you wish to use.
https://trac.edgewall.org/wiki/TracInstall

- 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/5d74ec9c-c10c-45db-9963-64d2d91db9af%40googlegroups.com.


[Trac] Best way to upgrade Trac data from 0.12.3 to 1.4.0 (latest stable version)?

2020-03-03 Thread Mr. Smith
Here's our situation. We currently have a single Trac *0.12.3 *instance 
hosted by RepositoryHosting.com. We want to self-host, but it's a hassle to 
install old Trac versions.

*What is the right way to get our data from 0.12.3 upgraded by or for a 
Trac 1.4 installation?*

I just have no idea here — we don't host the Trac ourselves.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/620062f7-fbd2-48cd-b4c6-26a485298f6b%40googlegroups.com.


Re: [Trac] tracd not working after OS upgrade from rhel 6.10 to 7.6

2020-03-03 Thread Jun Omae
Hi,

On Sat, Feb 29, 2020 at 2:19 AM Rakesh kumar  wrote:
>
> HI,
>
> We have upgraded the OS from rhel 6.10 to 7.6.
>
> Not abe to start the trac, Its giving the error while starting the trac
>
> Traceback (most recent call last):
>   File "/bin/tracd", line 5, in 
  ^^

tracd is normally installed to /usr/bin/tracd (or ${prefix}/bin/tracd
if virtualenv).
Otherwise, /usr/sbin/tracd is located if trac rpm package is used.
(refs. https://centos.pkgs.org/7/epel-x86_64/trac-1.0.13-1.el7.noarch.rpm.html)

I guess that you're manually copied tracd to /bin directory.

Instead, remove /bin/tracd file and try to use /usr/bin/tracd.

-- 
Jun Omae  (大前 潤)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/CAEVLMagJnGGRTJXWzO5sVL20bM77nCQLkUcVdJQHW1CHJ9uy1g%40mail.gmail.com.


Re: [Trac] Re: tracd not working after OS upgrade from rhel 6.10 to 7.6

2020-03-03 Thread RjOllos


On Tuesday, March 3, 2020 at 9:59:29 AM UTC-8, Jeff McKenna wrote:
>
> +1 for Ryan's recommendation for using Trac 1.2.5 now in production.
>
> I spent a few weeks of effort trying to upgrade my production Trac 
> instances to 1.4.1 (and of course saw the many users reporting issues with 
> that upgrade, and the response of 'see installation guide'), but in the end 
> I found that the most-recent I could upgrade to and still have all plugins 
> working in production is the 1.2.5 release. 
>

What issues did you see reported with the upgrade? I haven't noticed more 
issues reported that we've encountered with previous major releases, and 
many issues are due to users not following the upgrade procedure describe 
on TracUpgrade.

There are some plugin compatibility issues, but that's separate from the 
Trac upgrade. Which plugins are you using that aren't compatible?
 

> Hope that helps someone else.
>
> -jeff
>
>
>
> On Fri, Feb 28, 2020 at 2:01 PM Ryan Ollos  wrote:
>
>>
>>
>> On Fri, Feb 28, 2020 at 9:53 AM RjOllos  wrote:
>>
>>>
>>>
>>> On Friday, February 28, 2020 at 9:19:52 AM UTC-8, Rakesh kumar wrote:

 HI,

 We have upgraded the OS from rhel 6.10 to 7.6.

 Not abe to start the trac, Its giving the error while starting the trac

 Traceback (most recent call last):
   File "/bin/tracd", line 5, in 
 from pkg_resources import load_entry_point
   File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 3007, 
 in 
 working_set.require(__requires__)
   File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 728, 
 in require
 needed = self.resolve(parse_requirements(requirements))
   File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 626, 
 in resolve
 raise DistributionNotFound(req)
 pkg_resources.DistributionNotFound: Trac==1.2.2

 Thanks,
 Rakesh kumar

>>>
>>>
>>> Did you install Trac using the RedHat package manager, or using 
>>> easy_install/pip?
>>>
>>> - Ryan 
>>>
>>
>> Either way, you may want to just reinstall
>> * Uninstall/reinstall using package manager, or
>> * $ pip uninstall Trac
>>   $ pip install Trac==1.2.2
>>
>> If the latter, consider installing the latest 1.2.x, which is 1.2.5.
>> https://trac.edgewall.org/wiki/TracDownload#Trac12StableRelease
>>
>> - 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/trac-users/CA%2BBGpn88JoLG%3D6bSbLen6YH%3D6rfxzzGY8sBF2DgrTqUxqbdWwg%40mail.gmail.com
>>  
>> 
>> .
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/ccc9b1aa-7917-4108-ae4e-29cd4887b2b8%40googlegroups.com.


Re: [Trac] Re: tracd not working after OS upgrade from rhel 6.10 to 7.6

2020-03-03 Thread Jeff McKenna
+1 for Ryan's recommendation for using Trac 1.2.5 now in production.

I spent a few weeks of effort trying to upgrade my production Trac
instances to 1.4.1 (and of course saw the many users reporting issues with
that upgrade, and the response of 'see installation guide'), but in the end
I found that the most-recent I could upgrade to and still have all plugins
working in production is the 1.2.5 release.

Hope that helps someone else.

-jeff



On Fri, Feb 28, 2020 at 2:01 PM Ryan Ollos  wrote:

>
>
> On Fri, Feb 28, 2020 at 9:53 AM RjOllos  wrote:
>
>>
>>
>> On Friday, February 28, 2020 at 9:19:52 AM UTC-8, Rakesh kumar wrote:
>>>
>>> HI,
>>>
>>> We have upgraded the OS from rhel 6.10 to 7.6.
>>>
>>> Not abe to start the trac, Its giving the error while starting the trac
>>>
>>> Traceback (most recent call last):
>>>   File "/bin/tracd", line 5, in 
>>> from pkg_resources import load_entry_point
>>>   File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 3007,
>>> in 
>>> working_set.require(__requires__)
>>>   File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 728, in
>>> require
>>> needed = self.resolve(parse_requirements(requirements))
>>>   File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 626, in
>>> resolve
>>> raise DistributionNotFound(req)
>>> pkg_resources.DistributionNotFound: Trac==1.2.2
>>>
>>> Thanks,
>>> Rakesh kumar
>>>
>>
>>
>> Did you install Trac using the RedHat package manager, or using
>> easy_install/pip?
>>
>> - Ryan
>>
>
> Either way, you may want to just reinstall
> * Uninstall/reinstall using package manager, or
> * $ pip uninstall Trac
>   $ pip install Trac==1.2.2
>
> If the latter, consider installing the latest 1.2.x, which is 1.2.5.
> https://trac.edgewall.org/wiki/TracDownload#Trac12StableRelease
>
> - 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/trac-users/CA%2BBGpn88JoLG%3D6bSbLen6YH%3D6rfxzzGY8sBF2DgrTqUxqbdWwg%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/CAPGmwqCvn%3DJE-qNL2hEh0%2BHmzmSn3o2e_3XPp_-0UDJ7V1bjEA%40mail.gmail.com.