I'm actually no the admin of this Pootle server which is hosted by the
Sahana Foundation. So, I don't know exactly what could I add as extra
information about the context of the bug. Could you give to me some
questions I should reply? I could forward them to this Pootle server admin.

Regarding the code fix you suggest, What might it break elsewehere ?
I don't think we have a Pootle test environment, and so we shouldn't take
risks to crash the whole server.

Thanks again for your quick reply !

Olivier.


2013/6/4 Dwayne Bailey <dwa...@translate.org.za>

>
>
>
> On 4 June 2013 11:19, Olivier SARRAT <olivier.sar...@laposte.net> wrote:
>
>> Oops..
>> I realize that the mailing list is not set to be used automatically in
>> "Reply-to".
>> Here is the message I've just send to Dwayne.
>>
>>
>>
>> 2013/6/4 Olivier SARRAT <olivier.sar...@laposte.net>
>>
>> > Hi Dwayne,
>> >
>> > Thanks for your very quick answer.
>> > Here is the traceback I get:
>> >
>> > [Tue Jun 04 07:53:43 2013] [error] Traceback (most recent call last):
>> > [Tue Jun 04 07:53:43 2013] [error]   File
>> > "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py",
>> > lin
>> > e 111, in get_response
>> > [Tue Jun 04 07:53:43 2013] [error]     response = callback(request,
>> > *callback_args, **callback_kwargs)
>> > [Tue Jun 04 07:53:43 2013] [error]   File
>> > "/var/www/pootle/apps/pootle_app/views/language/view.py", line 47, in
>> > deco
>> > rated_f
>> > [Tue Jun 04 07:53:43 2013] [error]     return f(request,
>> > translation_project, *args, **kwargs)
>> > [Tue Jun 04 07:53:43 2013] [error]   File
>> > "/var/www/pootle/apps/pootle_app/views/language/view.py", line 63, in
>> > deco
>> > rated_f
>> > [Tue Jun 04 07:53:43 2013] [error]     return f(request,
>> > translation_project, *args, **kwargs)
>> > [Tue Jun 04 07:53:43 2013] [error]   File
>> > "/var/www/pootle/apps/pootle_translationproject/views.py", line 289,
>> > in ov
>> > erview
>> > [Tue Jun 04 07:53:43 2013] [error]     directory, store),
>> > [Tue Jun 04 07:53:43 2013] [error]   File
>> > "/var/www/pootle/apps/pootle_app/lib/view_handler.py", line 83, in
>> > __call__
>> > [Tue Jun 04 07:53:43 2013] [error]     return self.GET(template_vars,
>> > request, *args, **kwargs)
>> > [Tue Jun 04 07:53:43 2013] [error]   File
>> > "/var/www/pootle/apps/pootle_translationproject/views.py", line 253,
>> > in GET
>> > [Tue Jun 04 07:53:43 2013] [error]     'items':
>> > get_children(translation_project, directory),
>> > [Tue Jun 04 07:53:43 2013] [error]   File
>> > "/var/www/pootle/apps/pootle_misc/browser.py", line 154, in
>> > get_children
>> > [Tue Jun 04 07:53:43 2013] [error]     for child_store in
>> > directory.child_stores.iterator()]
>> > [Tue Jun 04 07:53:43 2013] [error]   File
>> > "/var/www/pootle/apps/pootle_misc/browser.py", line 129, in
>> > make_store_item
>> > [Tue Jun 04 07:53:43 2013] [error]     item = make_generic_item(store,
>> action)
>> > [Tue Jun 04 07:53:43 2013] [error]   File
>> > "/var/www/pootle/apps/pootle_misc/browser.py", line 87, in
>> > make_generic_item
>> > [Tue Jun 04 07:53:43 2013] [error]     stats = get_raw_stats(path_obj,
>> > include_suggestions=True)
>> > [Tue Jun 04 07:53:43 2013] [error]   File
>> > "/var/www/pootle/apps/pootle_misc/stats.py", line 44, in get_raw_stats
>> > [Tue Jun 04 07:53:43 2013] [error]     quick_stats =
>> > add_percentages(path_obj.getquickstats())
>> > [Tue Jun 04 07:53:43 2013] [error]   File
>> > "/var/www/pootle/apps/pootle_misc/util.py", line 55, in _getfromcache
>> > [Tue Jun 04 07:53:43 2013] [error]     result = function(instance,
>> > *args, **kwargs)
>> > [Tue Jun 04 07:53:43 2013] [error]   File
>> > "/var/www/pootle/apps/pootle_store/models.py", line 1457, in
>> > getquickstats
>> > [Tue Jun 04 07:53:43 2013] [error]     return
>> calculate_stats(self.units)
>> > [Tue Jun 04 07:53:43 2013] [error]   File
>> > "/var/www/pootle/apps/pootle_store/models.py", line 1368, in
>> > _get_units
>> > [Tue Jun 04 07:53:43 2013] [error]     self.require_units()
>> > [Tue Jun 04 07:53:43 2013] [error]   File
>> > "/var/www/pootle/apps/pootle_store/models.py", line 915, in
>> > require_units
>> > [Tue Jun 04 07:53:43 2013] [error]     if (self.file and
>> > is_monolingual(type(self.file.store)) and
>> > [Tue Jun 04 07:53:43 2013] [error]   File
>> > "/var/www/pootle/apps/pootle_store/fields.py", line 159, in _get_store
>> > [Tue Jun 04 07:53:43 2013] [error]     self._update_store_cache()
>> > [Tue Jun 04 07:53:43 2013] [error]   File
>> > "/var/www/pootle/apps/pootle_store/fields.py", line 179, in
>> > _update_store_cache
>> > [Tue Jun 04 07:53:43 2013] [error]     classes=factory_classes)
>> > [Tue Jun 04 07:53:43 2013] [error]   File
>> > "/usr/local/lib/python2.6/dist-packages/translate/storage/factory.py",
>> > line 188, in getobject
>> > [Tue Jun 04 07:53:43 2013] [error]     store =
>> storeclass.parsefile(storefile)
>> > [Tue Jun 04 07:53:43 2013] [error]   File
>> > "/usr/local/lib/python2.6/dist-packages/translate/storage/base.py",
>> > line 825, in parsefile
>> > [Tue Jun 04 07:53:43 2013] [error]     newstore =
>> cls.parsestring(storestring)
>> > [Tue Jun 04 07:53:43 2013] [error]   File
>> > "/usr/local/lib/python2.6/dist-packages/translate/storage/base.py",
>> > line 729, in parsestring
>> > [Tue Jun 04 07:53:43 2013] [error]     newstore.parse(storestring)
>> > [Tue Jun 04 07:53:43 2013] [error]   File
>> >
>> "/usr/local/lib/python2.6/dist-packages/translate/storage/properties.py",
>> > line 561, in parse
>> > [Tue Jun 04 07:53:43 2013] [error]     for line in
>> propsrc.split(u"\\n"):
>> > [Tue Jun 04 07:53:43 2013] [error] AttributeError: 'NoneType' object
>> > has no attribute 'split'
>>
>
> And my reply not to the list :)
>
> I'll need to spend some time replicating this.  But it looks as if after
> the delete while the file no longer exists on the filesystem Pootle is
> still trying to work against a file.  So propsrc is correctly empty
> (None).  But our code doesn't know what to do if it is.
>
> Could I ask you to do the following:
>
> 1) Could you report this as a bug so we can track it.  If you are able to
> elaborate further on the project setup that would be helpful
>
> 2) Could you try test this simple hack, to see if it gets you around this
> situation, it might break elsewhere though.
>
> In
>
> /usr/local/lib/python2.6/dist-packages/translate/storage/properties.py
>
>
> Can you change line 561 to read:
>
>
> for line in propsrc.split(u"\n") if line is not None:
>
>
>> >
>> >
>> >
>> > Best,
>> >
>> > Olivier.
>> >
>> > *--
>> > *Blog : http://www.grattecielhorizontal.info/
>> > *  dernier post: *Revenu universel, les vertus de débattre d’une utopie
>> > concrète <http://www.grattecielhorizontal.info/spip.php?article10>
>>
>> >
>> >
>> > 2013/6/4 Dwayne Bailey <dwa...@translate.org.za>
>> >
>> >>
>> >>
>> >>
>> >> On 4 June 2013 08:56, Olivier SARRAT <olivier.sar...@laposte.net>
>> wrote:
>> >>
>> >>> Hi,
>> >>>
>> >>> I'm facing a new bug on our Sahana Pootle server.
>> >>> Here is the scenario on my Java .properties based translation project
>> >>> Sigmah (http://pootle.sahanafoundation.org/projects/sigmah/), on a
>> >>> server
>> >>> which has been migrated from a earlier version of Pootle to v2.5.0 :
>> >>> 1. add a new language to the project
>> >>> 2. add a Java properties file as new source string file
>> >>> 3. remove this file by using the "Delete this folder" action
>> >>> 4. leave the translation project
>> >>> 5. try to come back to this project in this new language
>> >>> => You will get the following error :
>> >>>  Server Error
>> >>>
>> >>> An error has occurred. Thank you for your patience.
>> >>>
>> >>> 'NoneType' object has no attribute 'split'
>> >>>
>> >>> This issue also occurs on an already existing language like "English
>> >>> (United Kingdom)".
>> >>>
>> >>> Do you know if there could be any workaround for this issue ?
>> >>>
>> >>
>> >> Hi Olivier,
>> >>
>> >> Are you able to get a full traceback?  You should be able to see that
>> in
>> >> the error log. That will help us find the code in question.  The steps
>> can
>> >> help replicate this but lets try get the traceback first.
>> >>
>> >>
>> >>
>> >> --
>> >> Dwayne
>> >>
>> >> *Translate*
>> >> +27 12 460 1095
>> >>
>> >
>> >
>>
>> ------------------------------------------------------------------------------
>> How ServiceNow helps IT people transform IT departments:
>> 1. A cloud service to automate IT design, transition and operations
>> 2. Dashboards that offer high-level views of enterprise services
>> 3. A single system of record for all IT processes
>> http://p.sf.net/sfu/servicenow-d2d-j
>> _______________________________________________
>> Translate-pootle mailing list
>> Translate-pootle@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/translate-pootle
>>
>
>
>
> --
> Dwayne
>
> *Translate*
> +27 12 460 1095
>
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle

Reply via email to