Closed julian-poidevin closed 4 years ago
thanks, rv is an accidental global and should not have been there.
@bobintetley This did not fix the issue unfortunately, I keep having the same build problem.
The problem is related to schema.py
, I don't get how a change to common_widgets.js
fixed the issue π€ .
From what I can tell, for me the build stopped working starting c18ca71ed0449a16e5d098cb52d84bb1135dc123.
Isn't it related to the use of the constant path /home/robin/tmp/asm3.db
? This path does not exists for users using ASM on their own server like me π .
You're right, the error I fixed was further up in your output!
Yes, the fault is with schema. I updated things to generate the schema.js file (used for code complete in the SQL editor) statically for performance reasons. I meant to have the build generate the schema database that it uses - but forgot to do this and left it accessing a hard coded file on my machine.
The commit I just added fixes this. Thanks for your vigilance!
Hello @bobintetley, I just tried to rebuild ASM this morning on my server and the same error is occurring :
# Generate a JSON schema of the database for use when editing
# SQL within the program
[schema] =============================
scripts/schema/schema.py > src/static/js/min/schema.min.js
Traceback (most recent call last):
File "scripts/schema/schema.py", line 15, in <module>
for table in db.query("SELECT name FROM sqlite_master WHERE type='table' ORDER BY name"):
File "/usr/lib/python3/dist-packages/web/db.py", line 1069, in query
out = DB.query(self, *a, **kw)
File "/usr/lib/python3/dist-packages/web/db.py", line 664, in query
db_cursor = self._db_cursor()
File "/usr/lib/python3/dist-packages/web/db.py", line 575, in _db_cursor
return self.ctx.db.cursor()
File "/usr/lib/python3/dist-packages/web/db.py", line 516, in _getctx
self._load_context(self._ctx)
File "/usr/lib/python3/dist-packages/web/db.py", line 527, in _load_context
ctx.db = self._connect(self.keywords)
File "/usr/lib/python3/dist-packages/web/db.py", line 555, in _connect
return self.db_module.connect(**keywords)
sqlite3.OperationalError: unable to open database file
Makefile:67: recipe for target 'schema' failed
make: *** [schema] Error 1
Let me know if I can provide any additional details that might help you π
That's odd, schema.db must be failing, but it doesn't look like the schema target is trying to run it.
What happens when you run "make scripts/schema/schema.db"Β ? When I run "make schema" it builds schema.db if it is not present.
As far as I can see, the scripts is running, the schema.db
file is generated :
Here's the log output of make scripts/schema/schema.db
command : makeSchemaLog.txt
The error is that the schema.py file is failing to open schema.db - probably because I didn't update it and it's still looking for the file on my hard disk! What an idiot. Sorry about that...
I was wondering why there was no changes to shema.py
file but I'm not that familiar with ASM3 architecture so I thought that was normal π. No problem, will try this right away !
Hello,
I updated my ASM fork with the latest changes and I have an error during build at the
schema.py
step, here's the error log :