Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with importing csv #33

Open
1837456 opened this issue Jan 25, 2023 · 3 comments
Open

Issue with importing csv #33

1837456 opened this issue Jan 25, 2023 · 3 comments
Labels
Milestone

Comments

@1837456
Copy link

1837456 commented Jan 25, 2023

Hello,

I could not import a complete csv file so I tried to import one by one row to find the problem and I have no idea why but this is the problematic one (all data are anonmized but have the same length and structure):
Umsaetze_2023.01.04-neutral.csv

The import keeps spinning:
Screenshot 2023-01-25 at 20 39 47

These are the error messages from the browser (the nextcloud log does not show anything related):

Screenshot 2023-01-25 at 20 38 21

Screenshot 2023-01-25 at 20 39 08

Nextcloud 25.0.3
Money App 0.13.0

Please let me know if you need more information.

@powerpaul17
Copy link
Owner

Hello, thanks for the information. I don't see why the CSV should not work, it also seems to be a problem on the server (error 500), can you provide me with the relevant server logs please?

@1837456
Copy link
Author

1837456 commented Jan 26, 2023

It seems that I missed something last night looking at the nextcloud log. The "Verwendungszweck" column seems to be too long. And indeed, if I shorten that, I can import the csv without any problems and also the server doesn't show an error anymore.

Error OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'description' at row 1

/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php - line 329:

OC\DB\Exceptions\DbalException::wrap()

/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php - line 139:

OC\DB\QueryBuilder\QueryBuilder->executeStatement()

/var/www/nextcloud/apps/money/lib/Service/TransactionService.php - line 66:

OCP\AppFramework\Db\QBMapper->insert()

/var/www/nextcloud/apps/money/lib/Controller/TransactionController.php - line 98:

OCA\Money\Service\TransactionService->create()

/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 225:

OCA\Money\Controller\TransactionController->addTransaction()

/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 133:

OC\AppFramework\Http\Dispatcher->executeController()

/var/www/nextcloud/lib/private/AppFramework/App.php - line 172:

OC\AppFramework\Http\Dispatcher->dispatch()

/var/www/nextcloud/lib/private/Route/Router.php - line 298:

OC\AppFramework\App::main()

/var/www/nextcloud/lib/base.php - line 1047:

OC\Route\Router->match()

/var/www/nextcloud/index.php - line 36:

OC::handleRequest()

Caused by Doctrine\DBAL\Exception\DriverException: An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'description' at row 1

/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php - line 1780:

Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert()

/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php - line 1719:

Doctrine\DBAL\Connection->handleDriverException()

/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php - line 1173:

Doctrine\DBAL\Connection->convertExceptionDuringQuery()

/var/www/nextcloud/lib/private/DB/Connection.php - line 294:

Doctrine\DBAL\Connection->executeStatement()

/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php - line 354:

OC\DB\Connection->executeStatement()

/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php - line 281:

Doctrine\DBAL\Query\QueryBuilder->execute()

/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php - line 327:

OC\DB\QueryBuilder\QueryBuilder->execute()

/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php - line 139:

OC\DB\QueryBuilder\QueryBuilder->executeStatement()

/var/www/nextcloud/apps/money/lib/Service/TransactionService.php - line 66:

OCP\AppFramework\Db\QBMapper->insert()

/var/www/nextcloud/apps/money/lib/Controller/TransactionController.php - line 98:

OCA\Money\Service\TransactionService->create()

/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 225:

OCA\Money\Controller\TransactionController->addTransaction()

/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 133:

OC\AppFramework\Http\Dispatcher->executeController()

/var/www/nextcloud/lib/private/AppFramework/App.php - line 172:

OC\AppFramework\Http\Dispatcher->dispatch()

/var/www/nextcloud/lib/private/Route/Router.php - line 298:

OC\AppFramework\App::main()

/var/www/nextcloud/lib/base.php - line 1047:

OC\Route\Router->match()

/var/www/nextcloud/index.php - line 36:

OC::handleRequest()

Caused by Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'description' at row 1

/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php - line 94:

Doctrine\DBAL\Driver\PDO\Exception::new()

/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php - line 1163:

Doctrine\DBAL\Driver\PDO\Statement->execute()

/var/www/nextcloud/lib/private/DB/Connection.php - line 294:

Doctrine\DBAL\Connection->executeStatement()

/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php - line 354:

OC\DB\Connection->executeStatement()

/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php - line 281:

Doctrine\DBAL\Query\QueryBuilder->execute()

/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php - line 327:

OC\DB\QueryBuilder\QueryBuilder->execute()

/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php - line 139:

OC\DB\QueryBuilder\QueryBuilder->executeStatement()

/var/www/nextcloud/apps/money/lib/Service/TransactionService.php - line 66:

OCP\AppFramework\Db\QBMapper->insert()

/var/www/nextcloud/apps/money/lib/Controller/TransactionController.php - line 98:

OCA\Money\Service\TransactionService->create()

/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 225:

OCA\Money\Controller\TransactionController->addTransaction()

/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 133:

OC\AppFramework\Http\Dispatcher->executeController()

/var/www/nextcloud/lib/private/AppFramework/App.php - line 172:

OC\AppFramework\Http\Dispatcher->dispatch()

/var/www/nextcloud/lib/private/Route/Router.php - line 298:

OC\AppFramework\App::main()

/var/www/nextcloud/lib/base.php - line 1047:

OC\Route\Router->match()

/var/www/nextcloud/index.php - line 36:

OC::handleRequest()

Caused by PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'description' at row 1

/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php - line 92:

PDOStatement->execute()

/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php - line 1163:

Doctrine\DBAL\Driver\PDO\Statement->execute()

/var/www/nextcloud/lib/private/DB/Connection.php - line 294:

Doctrine\DBAL\Connection->executeStatement()

/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php - line 354:

OC\DB\Connection->executeStatement()

/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php - line 281:

Doctrine\DBAL\Query\QueryBuilder->execute()

/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php - line 327:

OC\DB\QueryBuilder\QueryBuilder->execute()

/var/www/nextcloud/lib/public/AppFramework/Db/QBMapper.php - line 139:

OC\DB\QueryBuilder\QueryBuilder->executeStatement()

/var/www/nextcloud/apps/money/lib/Service/TransactionService.php - line 66:

OCP\AppFramework\Db\QBMapper->insert()

/var/www/nextcloud/apps/money/lib/Controller/TransactionController.php - line 98:

OCA\Money\Service\TransactionService->create()

/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 225:

OCA\Money\Controller\TransactionController->addTransaction()

/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 133:

OC\AppFramework\Http\Dispatcher->executeController()

/var/www/nextcloud/lib/private/AppFramework/App.php - line 172:

OC\AppFramework\Http\Dispatcher->dispatch()

/var/www/nextcloud/lib/private/Route/Router.php - line 298:

OC\AppFramework\App::main()

/var/www/nextcloud/lib/base.php - line 1047:

OC\Route\Router->match()

/var/www/nextcloud/index.php - line 36:

OC::handleRequest()

@powerpaul17
Copy link
Owner

Ok, this makes sense, thanks for the information. The app currently never checks the length of the strings 😅 I will add some checks for the input parameters.

@github-project-automation github-project-automation bot moved this to Idea / Needs Concept in Money Jun 13, 2023
@powerpaul17 powerpaul17 moved this from Idea / Needs Concept to Planned in Money Nov 3, 2023
@powerpaul17 powerpaul17 added this to the v1 milestone May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Planned
Development

No branches or pull requests

2 participants