I think I found a bug in the trunk. I downgraded to rev 9700 and it started to work again. Regards, Stefan -------- Mensaje original --------
Hi! I had a working code that downloaded via FTP a file and then stored a record in the DB referencing it. I had to rewrite it because it was not handling well filenames with unicode characters in it. The problem is that now when trying to save the object to the DB I get the following error: TypeError: Cannot create a consistent method resolutionorder (MRO) for bases File, FieldFile The code I am using: f = open(myfile_name, 'wb') ftp.retrbinary('RETR %s' % myfile_name,f.write) f.close() tic = Ticket.objects.get(tic_id__exact=myfile_name.split('_')[0]) #My file has the ID of the ticket in the files name t = TicketDocument(doc=File(f), company=company, ticket=tic) t.save() # This step throws the TypeError I'm using trunk at 9826 (just updated) Any ideas would be appreciated. Regards, Stefan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~--- |
- [Fwd: Error with File object] Stefan Tunsch
- Re: [Fwd: Error with File object] Karen Tracey
- Re: [Fwd: Error with File object] Stefan Tunsch