Hello Joost,

I had previously commented out t.editor.windowManager.alert(e.errstr
|| ('Error response: ' + x.responseText)); line in tiny_mce/plugins/
spellchecker/edotor_plugin.js as I was getting some error when I click
spellchecker with empty text area. Hence, the error messages were
misleading.

I restored the original code and error that I am getting is not from
within the code, but it seems it is a enchant dictionary problem.
Error is as following:

RuntimeError at /tinymce/spellchecker/

dictionary not found for language 'en'

This error is thrown from spell_check method in tinymce/views.py when
enchant dict for en is not found. I removed the try-except block and
then I could get this error in 500.html.
Now, I am running it on Webfaction web host with CentOS system. Like
mentioned earlier, I had installed the enchant library and pyenchant
package on server manually. So import enchant works perfectly in
python interactive window. Also I was told by the web host support
people to include
SetEnv PYENCHANT_LIBRARY_PATH /home/mygoplanner/lib/libenchant.so

in httpd.conf . This is also in place.

I plan to contact Webfaction support again, meanwhile, if you could
detect anything that I have not done, please let me know.

Thanks Joost for all you help.

Thanks,

Sincerely,
Sonal.

On Aug 31, 11:17 pm, Joost Cassee <jo...@cassee.net> wrote:
> HiSonal,
>
> On 27 aug, 14:13,SonalBreed <sonal.br...@gmail.com> wrote:
>
> > I have django-tinymce spellchecker working perfectly on my local
> > machine which is Ububtu.
> > But as soon as, I deploy it on a web host (CentOS), it gives me
> > problems. Specifically, when I click the specllchecker button,
> > following errors are logged:
>
> > [...]
>
> >  File "/home/mygoplanner/webapps/mygostaging/mygo/tinymce/views.py",
> > line 69, in spell_check
> >    return HttpResponse(simplejson.dumps(output),
>
> > UnboundLocalError: local variable 'output' referenced before
> > assignment
>
> Looking at the code, I don't see how the spell_check function could
> throw that Error. I have just one idea: can you move the last return
> statement:
>
>     return HttpResponse(simplejson.dumps(output),
>         content_type='application/json')
>
> into the try block, just after the assignment of the output variable:
>
>         output = {
>             'id': id,
>             'result': result,
>             'error': None,
>         }
>         return HttpResponse(simplejson.dumps(output),
>             content_type='application/json')
>
> Regards,
>
> Joost
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to