Attachments gone since I upgraded from 6.2 to 6.4

Hello,

I recently upgraded a tryton from 6.2 to 6.4:

  • create a new venv with version 6.4.* instead of 6.2.* on the server
  • duplicate the database
  • trytond-admin -c trytond.conf -d thenewdb --all -vv
  • install the 6.4 client on the client pc

All went well, except that now I can’t access the attachments. Tryton still shows that there is an attachment to the documents that I’m seeing, but when I click on the name of the attachment to see it, it errors out:

ERROR:tryton.common.common:  File "/home/hobbes/devel/tryton/tryton-6.4/lib/python3.11/site-packages/tryton/gui/window/form.py", line 152, in activate
    callback()
  File "/home/hobbes/devel/tryton/tryton-6.4/lib/python3.11/site-packages/tryton/gui/window/attachment.py", line 100, in open_data
    filepath = file_write(attachment['name'], value['data'])
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hobbes/devel/tryton/tryton-6.4/lib/python3.11/site-packages/tryton/common/common.py", line 523, in file_write
    fp.write(data)

TypeError: a bytes-like object is required, not 'NoneType'

Did I miss something in the update, or is this a bug ?

Thanks

Have you changed/removed/added path in database section?
https://docs.tryton.org/projects/server/en/latest/topics/configuration.html#path

1 Like

wooot, I didn’t know about that file storage :slight_smile:

I didn’t change anything in the config, but as the database name has changed, the data was stored in the original subdir of ~/db

I copied everything, and now I have my attachments. Thanks

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.