Edward, The filename isn't bad. I used \C:Users\Lewisn\Downloads\introducing- creo_5mb.wmv as a second example of the problem. Maybe I misled you by using a different example. The text "Movie file not found: C:\Python32\Lib\site-packages\leo- editor\leo\core\" is the common first section of the error message. Viewrendered simply doesn't find the file.
Regards Lewis On Oct 29, 8:42 am, "Edward K. Ream" <[email protected]> wrote: > On Fri, Oct 28, 2011 at 4:15 PM, Edward K. Ream <[email protected]> wrote: > > > On Fri, Oct 28, 2011 at 7:44 AM, lewis <[email protected]> wrote: > >> Yes, same problem exists right through to build 4671 > > > Thanks for this confirmation. I've just put it on the list to investigate > > asap. > > Just did so. My guess is that the issue is confined to the get_fn > method in viewrendered.py. > > Oops. I just now took a good look at the error: > > file not found: C:\Python32\Lib\site-packages\leo-editor\leo\core > \C:Users\Lewisn\Downloads\introducing-creo_5mb.wmv > > There are two instances of \C: here! Obviously, this is the proximate > cause of the failure to open the file: the filename is bad. > > Earlier you said: > > @movie Creo.wmv > N:\Home\PTC_Creo\Creo.wmv > > I suspect that N:\Home is not getting translated properly; > We have another instance of bug 613153: > unable to describe root directory on thumb > drivehttps://bugs.launchpad.net/leo-editor/+bug/613153 > > Anyway, let's press on... > > Here is the before/after version of the code, slightly reformatted to > make the similarities and differences clearer:: > > # Before > > #@+node:ekr.20110320233639.5776: *5* get_fn > def get_fn (self,s,tag): > > pc = self ; p = pc.c.p > fn = s or p.h[len(tag):] > fn = fn.strip() > > path = g.os_path_finalize_join(g.app.loadDir,fn) > > ok = g.os_path_exists(path) > return ok,path > > # After > > def get_fn (self,s,tag): > > pc = self ; c = pc.c > fn = s or c.p.h[len(tag):] > fn = fn.strip() > > # path = g.os_path_finalize_join(g.app.loadDir,fn) > fn = fn.replace('\\','/') > parts = fn.split('/') > args = [g.app.loadDir] > args.extend(parts) > path = g.os_path_finalize_join(*args,c=c) > > ok = g.os_path_exists(path) > return ok,pat > > In other words, the only difference is replacing:: > > path = g.os_path_finalize_join(g.app.loadDir,fn) > > by:: > > fn = fn.replace('\\','/') > parts = fn.split('/') > args = [g.app.loadDir] > args.extend(parts) > path = g.os_path_finalize_join(*args,c=c) > > Perhaps replacing back slashes with forward slashes may have the > original problem, and then you used a "fancy" path that caused even > more problems. > > To find out, please insert the following (tested) trace and report the > output (it will go to the console): > > # Put this at the start of the method, before changing fn. > old_path = g.os_path_finalize_join(g.app.loadDir,fn) > > # Put this after path has been computed. > g.trace('old_path: %s\nnew_path: %s' % ( > repr(old_path),repr(path))) > > Please try this with both these nodes:: > > @movie Creo.wmv > @movie N:\Home\PTC_Creo\Creo.wmv (or something similar) > > Thanks. > > Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
