Closed reggaemanu closed 6 years ago
Can you also provide the CSV files you're trying to import? That would be helpful.
Here you go : filament_export_2018-04-09_02-20-35.zip But I have the same problem trying to manually add a spool.
I'm not sure that I can help. Just tried to import your data to a postgresql database and it worked fine.
Do you have the same issue when you are using only ascii characters?
Yeah, same issue even if I want to create a spool of PLA named "test". I'm not familiar with postgres (I used to mysql) but I guess this is a db issue then if you can't reproduce the bug. The thing is that I don't see what could be wrong with the db and if I google with the error I have in the log it seems to be a python encoding issue.
To be honest I have no idea what could cause the issue. Since version 0.4.1 the import/export feature uses unicode encoding and not ascii. The other problem is the strange syntax error issue which I can't explain. What version of the psycopg2
package and postgresql are you using?
psycopg2 2.7.3.2 PostgreSQL 9.3.14
Okay, that explains the syntax error. The ON CONFLICT
clause is only supported since postgresql 9.5. You need to update your installation.
Unfortunately I can't : the synology OS use that db server so I can't mess with it. Anyway I'm happy to have the answer to why it didn't worked :) I guess I'll have to install a server elsewhere but I don't want to put it on one of my raspberry, If for any reason the sdcard get corrupted I'll loose the db, on the NAS it would have been perfect. I'll see if there's a way to install another instance of postgres ...
You could try to install entware or optware, maybe those repositories provide newer versions for your NAS.
I managed to make it works on postgresql v10 via docker on the nas :) Thanks for your help and sorry for taking your time ! I couldn't live without this plugin anymore and that's getting even better now with the external db (as I've 3 octoprint, it will be even easier to managed my spools) Again, thanks 👍
You're welcome :wink:
What were you doing?
I'm trying to add spools or to import previous inventory after switching to postgres. (The connexion to the db works if I click the test connection button.)
What did you expect to happen?
Well, the spool should be added or the inventory imported.
What happened instead?
The plugin throw the error bellow: "Could not add spool There was an unexpected error while saving the filament spool, please consult the logs."
Link to octoprint.log
Link to contents of Javascript console in the browser
Further information
I'm using a prosgres db on my synology nas, I've tried with default db encoding and to force utf-8 encoding at db creation but with no luck. I don't know if the issue is the plugin or the db... I have read the FAQ and provided all required information.