← Back to team overview

openerp-india team mailing list archive

[Bug 1131272] Re: [7.0]DMS : downloading attachment fails

 

Thanks it solved the problem for txt file

I have thi s stacktrache uploading an odt and xls files but the files
are well uploaded anyway

2013-02-28 12:30:22,140 4844 INFO DMS werkzeug: 127.0.0.1 - - [28/Feb/2013 12:30:22] "GET /web/binary/saveas?model=ir.attachment&field=datas&filename_field=name&session_id=97b92a26d351477d94bb78239ab33bf1&id=6&t=1362050916754 HTTP/1.1" 200 -
2013-02-28 12:30:47,375 4844 ERROR DMS openerp.addons.document.content_index: Cannot determine mime type.
Traceback (most recent call last):
  File "C:\workspace_OpenERP\openerp_server_7_0_20130131\openerp\addons\document\content_index.py", line 167, in doIndex
    pop = Popen(['file','-b','--mime',fname], shell=False, stdout=PIPE)
  File "C:\Python27\lib\subprocess.py", line 679, in __init__
    errread, errwrite)
  File "C:\Python27\lib\subprocess.py", line 893, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
2013-02-28 12:30:47,515 4844 INFO DMS werkzeug: 127.0.0.1 - - [28/Feb/2013 12:30:47] "POST /web/binary/upload_attachment HTTP/1.1" 200 -
2013-02-28 12:30:47,592 4844 INFO DMS werkzeug: 127.0.0.1 - - [28/Feb/2013 12:30:47] "POST /web/dataset/search_read HTTP/1.1" 200 -

but it doesn't work with pdf file i got infinite loading screen and the
following stacktrace :

2013-02-28 12:33:56,562 4844 ERROR DMS openerp.addons.document.content_index: Cannot index file Start Point Of Sale - OpenERP.pdf (None).
Traceback (most recent call last):
  File "C:\workspace_OpenERP\openerp_server_7_0_20130131\openerp\addons\document\content_index.py", line 181, in doIndex
    res = (mime, fobj.indexContent(content,filename,fname or realfname) )
  File "C:\workspace_OpenERP\openerp_server_7_0_20130131\openerp\addons\document\content_index.py", line 90, in indexContent
    res = self._doIndexFile(rfname)
  File "C:\workspace_OpenERP\openerp_server_7_0_20130131\openerp\addons\document\std_index.py", line 169, in _doIndexFile
    pop = Popen(['pdftotext', '-enc', 'UTF-8', '-nopgbrk', "'"+ fname+"'", '-'], shell=False, stdout=PIPE)
  File "C:\Python27\lib\subprocess.py", line 679, in __init__
    errread, errwrite)
  File "C:\Python27\lib\subprocess.py", line 893, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
2013-02-28 12:33:56,562 4844 ERROR DMS openerp.osv.osv: Uncaught exception
Traceback (most recent call last):
  File "C:\workspace_OpenERP\openerp_server_7_0_20130131\openerp\osv\osv.py", line 123, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "C:\workspace_OpenERP\openerp_server_7_0_20130131\openerp\osv\osv.py", line 179, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "C:\workspace_OpenERP\openerp_server_7_0_20130131\openerp\osv\osv.py", line 166, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "C:\workspace_OpenERP\openerp_server_7_0_20130131\openerp\addons\document\document.py", line 121, in create
    vals['file_type'], vals['index_content'] = self._index(cr, uid, vals['datas'].decode('base64'), vals.get('datas_fname', False), None)
  File "C:\workspace_OpenERP\openerp_server_7_0_20130131\openerp\addons\document\document.py", line 132, in _index
    mime, icont = cntIndex.doIndex(data, datas_fname,  file_type or None, None)
TypeError: 'NoneType' object is not iterable
2013-02-28 12:33:56,562 4844 ERROR DMS openerp.netsvc: 'NoneType' object is not iterable
Traceback (most recent call last):
  File "C:\workspace_OpenERP\openerp_server_7_0_20130131\openerp\netsvc.py", line 289, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "C:\workspace_OpenERP\openerp_server_7_0_20130131\openerp\service\web_services.py", line 614, in dispatch
    res = fn(db, uid, *params)
  File "C:\workspace_OpenERP\openerp_server_7_0_20130131\openerp\osv\osv.py", line 169, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "C:\workspace_OpenERP\openerp_server_7_0_20130131\openerp\osv\osv.py", line 123, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "C:\workspace_OpenERP\openerp_server_7_0_20130131\openerp\osv\osv.py", line 179, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "C:\workspace_OpenERP\openerp_server_7_0_20130131\openerp\osv\osv.py", line 166, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "C:\workspace_OpenERP\openerp_server_7_0_20130131\openerp\addons\document\document.py", line 121, in create
    vals['file_type'], vals['index_content'] = self._index(cr, uid, vals['datas'].decode('base64'), vals.get('datas_fname', False), None)
  File "C:\workspace_OpenERP\openerp_server_7_0_20130131\openerp\addons\document\document.py", line 132, in _index
    mime, icont = cntIndex.doIndex(data, datas_fname,  file_type or None, None)
TypeError: 'NoneType' object is not iterable
2013-02-28 12:33:56,578 4844 INFO DMS werkzeug: 127.0.0.1 - - [28/Feb/2013 12:33:56] "POST /web/binary/upload_attachment HTTP/1.1" 200 -

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1131272

Title:
  [7.0]DMS : downloading attachment fails

Status in OpenERP Server:
  Fix Released

Bug description:
  OpenERP version : 7.0
  OS : Windows

  Hi,

  We have configured the DMS to store the attachments on the filesystem

  We are encouring error while we try to download a file previously
  attachment to a document.

  The downloaded file can't be opened and the size of the file is less
  than 1k.

  You can reproduce this with a new fresh database with demo data.
  Install the DMS

  Configure the dms to store the file on the filesystem. attach a file
  to a object(sales order or anything else)

  then try to download it.

  Note that in some cases we have error trying to attach a file to the
  object.

  This functionnality is clearly unconsistent on windows.

  We don't encoure the error when the dms store the attachment in the
  database.

  Thanks for you help

  Kind regards,
  Houssine

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1131272/+subscriptions