Firefly-iii: Row could not be imported. It already exists

Created on 30 Jul 2018  路  3Comments  路  Source: firefly-iii/firefly-iii

Bug description
I am running Firefly III version 4.7.5.3

I recently found a bug in my autoimport-tools and noticed that files with only one line were ignored because of the "has-headers": true, property in the import config file. I ended up deleting all transactions from 2018-05-01 till today and when importing all those months again, I get these errors:

  • import via WebUI (only that one transaction)
Row #0 ("[from_redacted] - [uniqueid_redacted] Faell.bis:20.07.18 [subject_redacted]") could not be imported. It already exists.
  • import via CLI (initial re-import)
Using configuration file: config/[redacted].json
Import into user: #1 ([redacted])
Type of import: file
Created job "v9hCn1GrUuyn"
File content saved.
Job configuration saved.
The has started. The process is not visible. Please wait.
Import has finished. Please wait for storage of data.
Job has finished.
154 transaction(s) have been imported.
You can find your transactions under tag "Import with key 'v9hCn1GrUuyn'"
1 error(s) occurred:
- Row #139 ("[from_redacted] - [uniqueid_redacted] Faell.bis:20.07.18 [subject_redacted]") could not be imported. It already exists.

I have tried:

  • php artisan ca:cl
  • https://[redacted]/flush
  • rm -rf bootstrap/cache/*

I have searched by:

  • account name
  • description
  • amount_less
  • amount_more

Any ideas?
I believe the transaction was not "completely" removed from the DB when everything was deleted.

Thanks in advance

question

Most helpful comment

The duplicate detector will remember old transactions. This is by design, but it can be prevented by removing the appropriate rows from the table journal_meta.

Find entries with the name ImportHashV2 having a time and date in the deleted_at column. Those entries belong to journals that you no longer have in the system.

Once deleted, the import should work.

All 3 comments

The duplicate detector will remember old transactions. This is by design, but it can be prevented by removing the appropriate rows from the table journal_meta.

Find entries with the name ImportHashV2 having a time and date in the deleted_at column. Those entries belong to journals that you no longer have in the system.

Once deleted, the import should work.

Thanks, it worked!, I removed all the "deleted" transactions and the import went through. Thanks for the quick fix!

@JC5 I've been having issues with this when testing CSV importing (and deleting the result), could it be possible to get a button in the admin area under "Options > Profiles > Delete ALL your deleted imports"?

For reference the PostgreSQL query I am running is DELETE FROM "journal_meta" WHERE "name" = 'import_hash_v2' AND "deleted_at" IS NOT NULL

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nicoschreiner picture nicoschreiner  路  3Comments

somethingGoneWrong picture somethingGoneWrong  路  3Comments

triDcontrols picture triDcontrols  路  3Comments

triDcontrols picture triDcontrols  路  3Comments

ImLemni picture ImLemni  路  3Comments