Error during update
IOError: [Errno 2] No such file or directory: u’./site1.local/public/files/2019-51-9-21:10.json.gz
Hi @Alaa_Badri,
I got the same error when I was updating the production server.
I got an error in the following file.
Option 1:
I just commented code within the execute function. I know it’s a temporary solution but it worked well. Make sure during bench update --reset, it’s going to override commented code.
Option 2:
or you can just write following database query:
Warning
It might harmful to your report. it won’t physically move your report under the private folder.
update tabFile
set is_private=1 where attached_to_doctype=“Prepared Report”;
Both option will allow you to update bench.
Dear @bhavikpatel7023
Thanks for your response could you please determine which lines i have to comment out and if bench update --reset override the code so how i will update bench
thanks in advance
from __future__ import unicode_literals
import frappe
def execute():
pass
'''
files = frappe.get_all("File", filters={"attached_to_doctype": "Prepared Report", "is_private": 0})
for file_name in files:
file_doc = frappe.get_doc("File", file_name)
file_doc.is_private = 1
file_doc.save()
'''
solution is in dev branch now. hopefully frappe team will merge soon.
You can paste below code in your machine. do bench migrate. then you can do bench update --reset. it suppose to work.
Here is final solutions.
Dear @bhavikpatel7023
I replace the file code but i still got the error and when trying to comment out the file the bench update --reset is override the file so any idea for that
Change field “is_private=1” directly in the database. I had the same issue. This is a temp fix. Frappe will soon send it in the update
Do following command.
- bench update --reset
(You’ll get error) - paste above cod in file.
- bench migrate
- bench update --reset
(Suppose to execute successfully)
tried no luck
same issues here also