Problems with new RST editor

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems with new RST editor

Timmie
Administrator
Hello,
following  the post on the Enthough blog
(http://blog.enthought.com/enthought-tool-suite/a-renewed-restructured-text-editor),
I'd like to thank the developer who developes that editor.

I have some problems, though:

I use PythonXY (current version) with updated libraries from SVN as
written in the blog entry.

I cannot:
* preview HTML of the RST source
* use Sphinx

Here is an error log when trying to preview HTML:
python app.py
The rest editor only supports qt4 as toolkit. Toolkit changed to qt4.
The rest editor only supports qt4 as toolkit. Toolkit changed to qt4.
The rest editor only supports qt4 as toolkit. Toolkit changed to qt4.
Exception occurred in traits notification handler.
Please check the log file for details.
Exception occurred in traits notification handler for object:
<enthought.traits.ui.qt4.code_e
ditor.SourceEditor object at 0x07356F90>, trait: squiggle_lines, old
value: [], new value: [1
1]
Traceback (most recent call last):
  File
"C:\Python26\lib\site-packages\traits-3.4.1.dev_r25701-py2.6-win32.egg\enthought\trait

s\trait_notifiers.py", line 481, in rebind_call_0
    self.dispatch( getattr( self.object(), self.name ) )
  File
"C:\Python26\lib\site-packages\traits-3.4.1.dev_r25701-py2.6-win32.egg\enthought\trait

s\trait_notifiers.py", line 424, in dispatch
    handler( *args )
  File
"C:\Python26\lib\site-packages\traitsbackendqt-3.4.1.dev_r25722-py2.6.egg\enthought\tr

aits\ui\qt4\code_editor.py", line 362, in _style_document
    self._widget.recolor()
AttributeError: 'AdvancedCodeWidget' object has no attribute 'recolor'

Here another log of the Sphinx run:

[ERROR] trait_notifiers.py:215 Exception occurred in traits notification
handler for object:
<enthought.traits.ui.qt4.code_editor.SourceEditor object at 0x07356F90>,
trait: squiggle_line
s, old value: [], new value: [11]
Traceback (most recent call last):
  File
"C:\Python26\lib\site-packages\traits-3.4.1.dev_r25701-py2.6-win32.egg\enthought\trait

s\trait_notifiers.py", line 481, in rebind_call_0
    self.dispatch( getattr( self.object(), self.name ) )
  File
"C:\Python26\lib\site-packages\traits-3.4.1.dev_r25701-py2.6-win32.egg\enthought\trait

s\trait_notifiers.py", line 424, in dispatch
    handler( *args )
  File
"C:\Python26\lib\site-packages\traitsbackendqt-3.4.1.dev_r25722-py2.6.egg\enthought\tr

aits\ui\qt4\code_editor.py", line 362, in _style_document
    self._widget.recolor()
AttributeError: 'AdvancedCodeWidget' object has no attribute 'recolor'
Traceback (most recent call last):
  File
"C:\Python26\lib\site-packages\traitsbackendqt-3.4.1.dev_r25722-py2.6.egg\enthought\py

face\ui\qt4\action\action_item.py", line 137, in _qt4_on_triggered
    self.controller.perform(action)
  File
"C:\Python26\lib\site-packages\traitsbackendqt-3.4.1.dev_r25722-py2.6.egg\enthought\tr

aits\ui\qt4\ui_base.py", line 131, in perform
    self.ui.do_undoable( self._perform, action )
  File
"C:\Python26\lib\site-packages\traits-3.4.1.dev_r25701-py2.6-win32.egg\enthought\trait

s\ui\ui.py", line 699, in do_undoable
    action( *args, **kw )
  File
"C:\Python26\lib\site-packages\traitsbackendqt-3.4.1.dev_r25722-py2.6.egg\enthought\tr

aits\ui\qt4\ui_base.py", line 136, in _perform
    method( self.ui.info )
  File
"D:\software_neue\sourcecode-checkouts\ENTHOUGHT\RestEditor\rest_editor_view.py",
line
 696, in sphinx_rst2html
    f.write(sphinx_rest_to_html(rest)[0])
  File
"D:\software_neue\sourcecode-checkouts\ENTHOUGHT\RestEditor\util.py",
line 157, in sph
inx_rest_to_html
    confoverrides=overrides, status=None, warning=StringIO())
  File
"C:\Python26\lib\site-packages\sphinx-1.1pre_87ac917ee1aadev_20100830-py2.6.egg\sphinx

\application.py", line 133, in __init__
    self._init_builder(buildername)
  File
"C:\Python26\lib\site-packages\sphinx-1.1pre_87ac917ee1aadev_20100830-py2.6.egg\sphinx

\application.py", line 193, in _init_builder
    self.builder = builderclass(self)
  File
"D:\software_neue\sourcecode-checkouts\ENTHOUGHT\RestEditor\util.py",
line 115, in my_
init
    sphinx.builders.Builder.__init__(self, app, env, freshenv)
TypeError: __init__() takes exactly 2 arguments (4 given)

How do I set this editor up to run with Sphinx?

Thanks for your efforts.

Regards,
Timmie

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problems with new RST editor

Kevin Salvesen
Hi Timmie, 

I know about the first exception (AttributeError: 'AdvancedCodeWidget' object has no attribute 'recolor'). This is because the port of the text editor widget isn't completely finished and some functions may be missing (in this case, it would be the function to underline lines where there are errors in the text). I won't be able to fix that right now, but I'll at least try to make a quick fix tomorrow to catch the exception and make it stop spamming those error messages.

As for the second error, I've just noticed that the rest editor doesn't work with Sphinx 1.0.x. (I was still running Sphinx 0.6.5). I will try to fix this tomorrow. Until then, you should be able to make it work with Sphinx 0.6.5. (easy_install Sphinx=0.6.5).

Cheers,
Kevin

On Tue, Aug 31, 2010 at 12:53 AM, Tim Michelsen <[hidden email]> wrote:
Hello,
following  the post on the Enthough blog
(http://blog.enthought.com/enthought-tool-suite/a-renewed-restructured-text-editor),
I'd like to thank the developer who developes that editor.

I have some problems, though:

I use PythonXY (current version) with updated libraries from SVN as
written in the blog entry.

I cannot:
* preview HTML of the RST source
* use Sphinx

Here is an error log when trying to preview HTML:
python app.py
The rest editor only supports qt4 as toolkit. Toolkit changed to qt4.
The rest editor only supports qt4 as toolkit. Toolkit changed to qt4.
The rest editor only supports qt4 as toolkit. Toolkit changed to qt4.
Exception occurred in traits notification handler.
Please check the log file for details.
Exception occurred in traits notification handler for object:
<enthought.traits.ui.qt4.code_e
ditor.SourceEditor object at 0x07356F90>, trait: squiggle_lines, old
value: [], new value: [1
1]
Traceback (most recent call last):
 File
"C:\Python26\lib\site-packages\traits-3.4.1.dev_r25701-py2.6-win32.egg\enthought\trait

s\trait_notifiers.py", line 481, in rebind_call_0
   self.dispatch( getattr( self.object(), self.name ) )
 File
"C:\Python26\lib\site-packages\traits-3.4.1.dev_r25701-py2.6-win32.egg\enthought\trait

s\trait_notifiers.py", line 424, in dispatch
   handler( *args )
 File
"C:\Python26\lib\site-packages\traitsbackendqt-3.4.1.dev_r25722-py2.6.egg\enthought\tr

aits\ui\qt4\code_editor.py", line 362, in _style_document
   self._widget.recolor()
AttributeError: 'AdvancedCodeWidget' object has no attribute 'recolor'

Here another log of the Sphinx run:

[ERROR] trait_notifiers.py:215 Exception occurred in traits notification
handler for object:
<enthought.traits.ui.qt4.code_editor.SourceEditor object at 0x07356F90>,
trait: squiggle_line
s, old value: [], new value: [11]
Traceback (most recent call last):
 File
"C:\Python26\lib\site-packages\traits-3.4.1.dev_r25701-py2.6-win32.egg\enthought\trait

s\trait_notifiers.py", line 481, in rebind_call_0
   self.dispatch( getattr( self.object(), self.name ) )
 File
"C:\Python26\lib\site-packages\traits-3.4.1.dev_r25701-py2.6-win32.egg\enthought\trait

s\trait_notifiers.py", line 424, in dispatch
   handler( *args )
 File
"C:\Python26\lib\site-packages\traitsbackendqt-3.4.1.dev_r25722-py2.6.egg\enthought\tr

aits\ui\qt4\code_editor.py", line 362, in _style_document
   self._widget.recolor()
AttributeError: 'AdvancedCodeWidget' object has no attribute 'recolor'
Traceback (most recent call last):
 File
"C:\Python26\lib\site-packages\traitsbackendqt-3.4.1.dev_r25722-py2.6.egg\enthought\py

face\ui\qt4\action\action_item.py", line 137, in _qt4_on_triggered
   self.controller.perform(action)
 File
"C:\Python26\lib\site-packages\traitsbackendqt-3.4.1.dev_r25722-py2.6.egg\enthought\tr

aits\ui\qt4\ui_base.py", line 131, in perform
   self.ui.do_undoable( self._perform, action )
 File
"C:\Python26\lib\site-packages\traits-3.4.1.dev_r25701-py2.6-win32.egg\enthought\trait

s\ui\ui.py", line 699, in do_undoable
   action( *args, **kw )
 File
"C:\Python26\lib\site-packages\traitsbackendqt-3.4.1.dev_r25722-py2.6.egg\enthought\tr

aits\ui\qt4\ui_base.py", line 136, in _perform
   method( self.ui.info )
 File
"D:\software_neue\sourcecode-checkouts\ENTHOUGHT\RestEditor\rest_editor_view.py",
line
 696, in sphinx_rst2html
   f.write(sphinx_rest_to_html(rest)[0])
 File
"D:\software_neue\sourcecode-checkouts\ENTHOUGHT\RestEditor\util.py",
line 157, in sph
inx_rest_to_html
   confoverrides=overrides, status=None, warning=StringIO())
 File
"C:\Python26\lib\site-packages\sphinx-1.1pre_87ac917ee1aadev_20100830-py2.6.egg\sphinx

\application.py", line 133, in __init__
   self._init_builder(buildername)
 File
"C:\Python26\lib\site-packages\sphinx-1.1pre_87ac917ee1aadev_20100830-py2.6.egg\sphinx

\application.py", line 193, in _init_builder
   self.builder = builderclass(self)
 File
"D:\software_neue\sourcecode-checkouts\ENTHOUGHT\RestEditor\util.py",
line 115, in my_
init
   sphinx.builders.Builder.__init__(self, app, env, freshenv)
TypeError: __init__() takes exactly 2 arguments (4 given)

How do I set this editor up to run with Sphinx?

Thanks for your efforts.

Regards,
Timmie

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problems with new RST editor

bryce hendrix

Kevin,

I'll tackle the recolor error if you can take a look at the sphinx stuff.

Bryce

On Aug 30, 2010 7:38 PM, "Kevin Salvesen" <[hidden email]> wrote:

Hi Timmie, 

I know about the first exception (AttributeError: 'AdvancedCodeWidget' object has no attribute 'recolor'). This is because the port of the text editor widget isn't completely finished and some functions may be missing (in this case, it would be the function to underline lines where there are errors in the text). I won't be able to fix that right now, but I'll at least try to make a quick fix tomorrow to catch the exception and make it stop spamming those error messages.

As for the second error, I've just noticed that the rest editor doesn't work with Sphinx 1.0.x. (I was still running Sphinx 0.6.5). I will try to fix this tomorrow. Until then, you should be able to make it work with Sphinx 0.6.5. (easy_install Sphinx=0.6.5).

Cheers,
Kevin



On Tue, Aug 31, 2010 at 12:53 AM, Tim Michelsen <[hidden email]> wrote:
>
> Hello,
> ...


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problems with new RST editor

Kevin Salvesen
The Sphinx problem should be fixed. Turns out some variables had changed name and some constructor we used changed a bit in the version of Sphinx. Both the previewer and Sphinx html export function seem to work now. There is still one problem on Windows though as the html previewer won't use the Sphinx theme (exporting the file to html and opening it with a browser will work and will have the full theme). Everything seems to work quite fine on Ubuntu though. I'll see if I can get it fixed in the short future.

So, try the latest version of the rest editor source code and see if it works.

Cheers,
Kevin

On Tue, Aug 31, 2010 at 5:18 AM, bryce hendrix <[hidden email]> wrote:

Kevin,

I'll tackle the recolor error if you can take a look at the sphinx stuff.

Bryce

On Aug 30, 2010 7:38 PM, "Kevin Salvesen" <[hidden email]> wrote:

Hi Timmie, 

I know about the first exception (AttributeError: 'AdvancedCodeWidget' object has no attribute 'recolor'). This is because the port of the text editor widget isn't completely finished and some functions may be missing (in this case, it would be the function to underline lines where there are errors in the text). I won't be able to fix that right now, but I'll at least try to make a quick fix tomorrow to catch the exception and make it stop spamming those error messages.

As for the second error, I've just noticed that the rest editor doesn't work with Sphinx 1.0.x. (I was still running Sphinx 0.6.5). I will try to fix this tomorrow. Until then, you should be able to make it work with Sphinx 0.6.5. (easy_install Sphinx=0.6.5).

Cheers,
Kevin



On Tue, Aug 31, 2010 at 12:53 AM, Tim Michelsen <[hidden email]> wrote:
>
> Hello,
> ...

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev



_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problems with new RST editor

bryce hendrix
I've fixed the recolor error with a partial implementation of the highlighting errors. There is now a gutter to the right, where the errors get marked, but the squiggle underlining has not yet been implemented.

Bryce

On Tue, Aug 31, 2010 at 8:38 AM, Kevin Salvesen <[hidden email]> wrote:
The Sphinx problem should be fixed. Turns out some variables had changed name and some constructor we used changed a bit in the version of Sphinx. Both the previewer and Sphinx html export function seem to work now. There is still one problem on Windows though as the html previewer won't use the Sphinx theme (exporting the file to html and opening it with a browser will work and will have the full theme). Everything seems to work quite fine on Ubuntu though. I'll see if I can get it fixed in the short future.

So, try the latest version of the rest editor source code and see if it works.

Cheers,
Kevin

On Tue, Aug 31, 2010 at 5:18 AM, bryce hendrix <[hidden email]> wrote:

Kevin,

I'll tackle the recolor error if you can take a look at the sphinx stuff.

Bryce

On Aug 30, 2010 7:38 PM, "Kevin Salvesen" <[hidden email]> wrote:

Hi Timmie, 

I know about the first exception (AttributeError: 'AdvancedCodeWidget' object has no attribute 'recolor'). This is because the port of the text editor widget isn't completely finished and some functions may be missing (in this case, it would be the function to underline lines where there are errors in the text). I won't be able to fix that right now, but I'll at least try to make a quick fix tomorrow to catch the exception and make it stop spamming those error messages.

As for the second error, I've just noticed that the rest editor doesn't work with Sphinx 1.0.x. (I was still running Sphinx 0.6.5). I will try to fix this tomorrow. Until then, you should be able to make it work with Sphinx 0.6.5. (easy_install Sphinx=0.6.5).

Cheers,
Kevin



On Tue, Aug 31, 2010 at 12:53 AM, Tim Michelsen <[hidden email]> wrote:
>
> Hello,
> ...

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev



_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev



_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problems with new RST editor

Timmie
Administrator
In reply to this post by Kevin Salvesen
> The Sphinx problem should be fixed. Turns out some variables had changed name and some constructor we used changed a bit in the version of Sphinx. Both the previewer and Sphinx html export function seem to work now. There is still one problem on Windows though as the html previewer won't use the Sphinx theme (exporting the file to html and opening it with a browser will work and will have the full theme). Everything seems to work quite fine on Ubuntu though. I'll see if I can get it fixed in the short future.
Thanks.

I tested it agian.

Here is a list of issues I encountered:

* quite slow in creating the first preview
* file open dialogue is also slow
* menues could get better titles (convert to file)
* toggle file browser dows not have any effect
* Sphinx issues
    * preview does not understand some directives: todo
    * does not form preview of a Sphinx indes page

Regards.
Reply | Threaded
Open this post in threaded view
|

Re: Problems with new RST editor

bryce hendrix
In reply to this post by Timmie
Tim Michelsen <timmichelsen@...> writes:

>
> Hello,
> following  the post on the Enthough blog
> (http://blog.enthought.com/enthought-tool-suite/a-renewed-restructured-text-
editor),
> I'd like to thank the developer who developes that editor.
>
> I have some problems, though:


Tim, I don't know if these issues were ever followed up on, but to summarize, it
looks like there were 2 issues:

1. The recolor method wasn't implemented. I fixed this about a month ago.

2. It appears you're using a version of Sphinx which has a different API. I know
initially the ReST Editor did not support Sphinx 1.0+, but I believe that was
addressed. If you're still having problems, can you tell us which version of
Sphinx you are using?

Bryce



_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problems with new RST editor

Timmie
Administrator
> 1. The recolor method wasn't implemented. I fixed this about a month ago.
>
> 2. It appears you're using a version of Sphinx which has a different API. I know
> initially the ReST Editor did not support Sphinx 1.0+, but I believe that was
> addressed. If you're still having problems, can you tell us which version of
> Sphinx you are using?
I have still problems to start the program after the last update.
Some error with pyflakes.
Can send a error log tomorrow.

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev