On Tue, Apr 24, 2012 at 2:54 PM, Vsevolod Fedorov
<[email protected]> wrote:
> On 04/24/12 17:40, lkcl luke wrote:
>>> Now, under pyjd, pyjamas images are loaded from pyjd.pyjdinitpth by
>>> default. Which is full path to installed pyjamas.
>>> This is fine when I run application from local file. But it fails when I
>>> try to run application from a web server (ajax-enabling mode).
>>   ok have you specified
>> pyjd.setup("http://{insertserver}/{path}/{loaderfile.html";?
>
> Yes.
> I forgot to mention that my app was working fine until I pulled latest
> pyjamas some time ago.
>
> Here are some logs from server:
> ...
> INFO     2012-04-24 13:43:39,575 dev_appserver.py:2832] "GET
> /pyjd-public/index.html HTTP/1.1" 200 -
> ...
> INFO     2012-04-24 13:43:41,687 dev_appserver.py:2832] "GET
> /pyjd-public/view-page.css HTTP/1.1" 200 -
> ERROR    2012-04-24 13:43:41,747 dev_appserver.py:1914] Error
> encountered reading file
> "/tmp/byhr/be/static/tmp/byhr/env/pyjamas/library/pyjamas/ui/public/tree_white.gif":
> [Errno 2] No such file or directory:
> '/tmp/byhr/be/static/tmp/byhr/env/pyjamas/library/pyjamas/ui/public/tree_white.gif'
> INFO     2012-04-24 13:43:41,750 dev_appserver.py:2832] "GET
> /tmp/byhr/env/pyjamas/library/pyjamas/ui/public/tree_white.gif HTTP/1.1"
> 404 -
>
> So, pyjd now tries to load images by absolute path. And, of course, can't.

 arse.  that's wrong.

> I have these images copied to public/ directory. But they are never
> accessed under pyjd now.

 rhhhmm.... i knew there was a reason why i was reluctant about the
getImageBaseURL thing (pygwt.py).  ok, a workaround is to just go "if
not getModuleBaseURL.startswith("http://";) or https:// or better yet,
if it startswith "file://" then return pyjdinitpth+blahblah.

for now however please just hack Tree.py and other uses of
pygwt.getImageBaseUrl to pass in images=True ok?

... or think of a modification or other solution :)


l.

Reply via email to