Re: [web2py] Re: upload bug in filename

2010-07-05 Thread Sw1
Hi There, Any updates or adises on my case ? Thx On Sat, Jul 3, 2010 at 5:39 PM, Swell wrote: > ok i hae done that and it complains about > IOError: [Errno 2] No such file or directory: > 'a >

[web2py] Re: upload bug in filename

2010-07-03 Thread Swell
ok i hae done that and it complains about IOError: [Errno 2] No such file or directory: 'a aa

[web2py] Re: upload bug in filename

2010-07-02 Thread mdipierro
Can you try replace dest_file = open(pathfilename, 'wb') with try: dest_file = open(pathfilename, 'wb') except: logging.error(str(traceback.format_exc())) On 2 Lug, 03:22, Swell wrote: > Hi I may hae found something > > if i look at line 2688 in gluon/sql.py i can see in the function > store:

[web2py] Re: upload bug in filename

2010-07-02 Thread Swell
Hi I may hae found something if i look at line 2688 in gluon/sql.py i can see in the function store: newfilename = newfilename[:200] + '.' + extension but so far so good it doesn t break anything to truncate the filename. later in the function ( line 2699) i see pathfilename = os.path.join(path,

[web2py] Re: upload bug in filename

2010-06-26 Thread Yarko Tymciurak
On Jun 26, 12:46 pm, Swell wrote: > Yes i am using web2py 1.79.2 on windows 7 64b > Can someone try to save the web2py files in a very long directory name > ( something like 200 characters ) and use the kind of filename i > provided ( long ) and see what is happening on mac/linux? Sorry - I repli

[web2py] Re: upload bug in filename

2010-06-26 Thread Yarko Tymciurak
On Jun 26, 12:46 pm, Swell wrote: > Yes i am using web2py 1.79.2 on windows 7 64b > Can someone try to save the web2py files in a very long directory name > ( something like 200 characters ) and use the kind of filename i > provided ( long ) and see what is happening on mac/linux? ... well, this

[web2py] Re: upload bug in filename

2010-06-26 Thread Swell
Yes i am using web2py 1.79.2 on windows 7 64b Can someone try to save the web2py files in a very long directory name ( something like 200 characters ) and use the kind of filename i provided ( long ) and see what is happening on mac/linux? I am doing local tests only , it means that the file are o

[web2py] Re: upload bug in filename

2010-06-25 Thread Yarko Tymciurak
Perhaps you can give us a few more specifics about your system, and your test methods. It seems that there is a filename limit of 226 (?) characters, and a path limit of 255 characters on FAT32 filesystems (although brief googling shows some inconsistent data). In any case, there should be a spec

[web2py] Re: upload bug in filename

2010-06-25 Thread Swell
Ok i have been able to reproduce the bug , it works perfectly if the web2py tree is in c:\ it doesnot if it is copied on the desktop(C:\Users\M\Desktop\web2py) so it seems that it is related the filenamepath(basename+filename)

[web2py] Re: upload bug in filename

2010-06-25 Thread Swell
Thx you for your help, i am thinking now that it is maybe not the filename itself that is wrong but maybe filepathname. I mean that it is the concat of the basename and filename is maybe too long . i am going to look at this (by changing the web2py src tree to c:\ so that a shorter basename is goin

[web2py] Re: upload bug in filename

2010-06-24 Thread mdipierro
Thank you Russell! This saves me some time. On Jun 24, 7:40 pm, Russell wrote: > As an aside, the mixing of \\ and  / is unsightly but does not seem to > cause a problem on widows.  If you want to tidy it up, it's around > line 786 of main.py: > >     request.folder = os.path.join(request.env.web

[web2py] Re: upload bug in filename

2010-06-24 Thread Yarko Tymciurak
actually, Russell, I don't think you want to do that... On Jun 24, 7:40 pm, Russell wrote: > As an aside, the mixing of \\ and  / is unsightly but does not seem to > cause a problem on widows.  If you want to tidy it up, it's around > line 786 of main.py: > >     request.folder = os.path.join(req

[web2py] Re: upload bug in filename

2010-06-24 Thread Russell
As an aside, the mixing of \\ and / is unsightly but does not seem to cause a problem on widows. If you want to tidy it up, it's around line 786 of main.py: request.folder = os.path.join(request.env.web2py_path, 'applications', request.application) + '/' On Jun 25, 11:15 am, Y

[web2py] Re: upload bug in filename

2010-06-24 Thread Yarko Tymciurak
By the way - The filename in the upload directory was 194 characters --- it's entirely possible that windows was having trouble with this. Here is the listing of my test uploads directory (the first was just a 'normal' length file): -rw-r--r-- 1 yarko staff 2642 Jun 24 17:33 test.file. 880c

[web2py] Re: upload bug in filename

2010-06-24 Thread Yarko Tymciurak
Hi M - So I've used you example (a little simplified): On Jun 23, 3:15 am, Swell wrote: > Ok > I will post some code here to show as much as possible > > here is the db definition: > > db.define_table('papers', >   Field('title','string'), >   Field('author','string'), >   Field('file','upload')

[web2py] Re: upload bug in filename

2010-06-24 Thread mdipierro
Something s wrong in building the upload paths. You get C:\\...\\web2py\\applications\\Library/databases\\..\\uploads\\... notice \\ everywhere (correct) but / between Library and databases and \\..\\ should not be there. This is a bug somewhere. a Missing os.path.join probably. Will work on it

[web2py] Re: upload bug in filename

2010-06-23 Thread Swell
Ok I will post some code here to show as much as possible here is the db definition: db.define_table('papers', Field('title','string'), Field('author','string'), Field('file','upload'), ) then if i try to use the database administration tool available in Models section and try to insert

[web2py] Re: upload bug in filename

2010-06-17 Thread Yarko Tymciurak
On Jun 17, 6:18 pm, Swell wrote: > thx yarko for your detailed answer. > I have not written code so far, I have been using the administrative > interface provided by web2py to manage the records in the DB. > I am going to generate another test showing this kind of behaviour > with a more regular

[web2py] Re: upload bug in filename

2010-06-17 Thread Swell
thx yarko for your detailed answer. I have not written code so far, I have been using the administrative interface provided by web2py to manage the records in the DB. I am going to generate another test showing this kind of behaviour with a more regular filename. On Jun 17, 11:51 pm, Yarko Tymci

[web2py] Re: upload bug in filename

2010-06-17 Thread Yarko Tymciurak
On Jun 17, 4:59 pm, Swell wrote: > There is nothing suspicious here about the filename ( it was an > example here, but it has the same effect with a file containing the > description oof the paper + all the authors ). I am almost sure that > it is related to size of the path + filename that is not

[web2py] Re: upload bug in filename

2010-06-17 Thread Rowdy
Swell wrote: don't really know but i tried with that filename : aaa.pdf (which containt 111 a if you trust me :) and get the error ticket , showing this last call File "C:\Users\M\Deskto

[web2py] Re: upload bug in filename

2010-06-17 Thread Swell
There is nothing suspicious here about the filename ( it was an example here, but it has the same effect with a file containing the description oof the paper + all the authors ). I am almost sure that it is related to size of the path + filename that is not correctly handled . But i can't spot wher

[web2py] Re: upload bug in filename

2010-06-15 Thread Yarko Tymciurak
It looks like something else might be wrong here... how are you getting these filenames? On Jun 15, 2:37 am, Swell wrote: > don't really know but i tried with that filename : > > aaa > .p

[web2py] Re: upload bug in filename

2010-06-15 Thread Swell
don't really know but i tried with that filename : aaa.pdf (which containt 111 a if you trust me :) and get the error ticket , showing this last call File "C:\Users\M\Desktop\web2py_src\we