[Cubicweb] Connection Error on CubicWeb.

Celso FLORES celso.flores at crealibre.com
Fri Oct 28 11:51:04 CEST 2016


Gracias Nico!.

Indeed, I just found another work around :

Avoid using the *render_entity_attributes* from my *report primary view*,
and sending all entity attributes to the render_entity_title...  and that
worked.

I will use your cleaner try-except, tomorrow.

----------------------------------------

Now surfing over this momentum wave, I am trying to fix some problem I told
you we had about a endless waiting time for the browser, which needed a
second click.

It seems related to this jquery.js / ajax.js configuration:

async = false,

associeted with the XMLHttpRequest deprecated status in jquery. According to
this
<http://stackoverflow.com/questions/27736186/jquery-has-deprecated-synchronous-xmlhttprequest>
.

First tests are encouraging.

Well, I am pretty confident that every struggle has a solution with a
mixture of stackoverflow, "grep" and this cw list.

Merci et bonne journée a tous.


2016-10-28 3:10 GMT-05:00 Nicolas Chauvat <nicolas.chauvat at logilab.fr>:

> On Fri, Oct 28, 2016 at 10:05:07AM +0200, Nicolas Chauvat wrote:
> > On Thu, Oct 27, 2016 at 01:34:17AM -0500, Celso FLORES wrote:
> > > ConnectionError: ('Connection aborted.', error(104, 'Connection reset
> by
> > > peer'))
> >
> > From the point of view of the server, the peer (your browser) reset
> > the connection.
> > [...]
> > If it happens again, try to ping or traceroute your server from where
> > you run your browser.
>
> Sorry, I rushed a bit to send this email and it will not help you
> much. Here is a better answer.
>
> Your traceback says:
>
>   File "/home/crealibre/src/cubes/filemanager/views/report.py", line
>   41, in render_entity_attributes
>       resp = requests.head(url)
>
> It means you make a call to requests (the python lib to handle HTTP
> requests) and expect this call never to fail. If it fails, your app
> crashes. That is just what you report.
>
> Wrap this line/block in a try/except to handle the failure cases and
> you will be back on track.
>
> --
> Nicolas Chauvat
>
> logilab.fr - services en informatique scientifique et gestion de
> connaissances
>



-- 
Celso FLORES
Knowledge Management Consultant
Mx. Celular - 55 25 07 21 60
celso.flores at crealibre.com  about.me/celsoflores
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20161028/cb39329f/attachment-0102.html>


More information about the Cubicweb mailing list