Naming series issue: Data too long for column 'name'
See original GitHub issueDescription of the issue
While saving documents with custom naming series, throwing below error: Data too long for column name
Context information (for bug reports)
Output of bench version
ERPNext: v13.35.2 (HEAD)
Frappe Framework: v13.35.1 (HEAD)
Steps to reproduce the issue
- Custom series for journal entry : JV-.YY.-.{code}…#### where code is data field in journal entry that has maximum of 4 characters
- Create journal entry with new series and code as for eg. DXB
- Error pymsql.err.DataError : (1406, “Data too long for column ‘name’ at row 1”)
Observed result
It is not a new series. There are already couple of documents saved with this series. Then after the latest release (13.35) the issue started
Expected result
Should be saved with next counter.
Additional information
When checked the code, the issue is in passing the key to get series in frappe/model/naming.py. elif doc and doc.get(e): part = (cstr(doc.get(e)) or “”).strip()
should be replaced with
elif doc and doc.get(e): part = doc.get(e)
As it is passing the entire dict causing data too long error
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Data too long for column error - Databricks Knowledge Base
Problem You are trying to insert a struct into a table, but you get a java.sql.SQLException: Data too long for column error.
Read more >How to fix data too long for column - Stack Overflow
I've done some searching and I see the error is common for varchar, and people say to switch to longtext, however the project...
Read more >Data too long for column error - Azure Databricks
If a column exceeds 4000 characters it is too big for the default datatype and returns an error.
Read more >What is the MySQL error: “Data too long for column”?
The “Data too long for column” error occurs when you insert more data for a column that does not have the capability to...
Read more >MySQL 8.0 Reference Manual :: 13.2.9 LOAD DATA Statement
Assignments in the SET clause should have only column names on the left hand side of assignment operators. You can use subqueries in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
temporary fix remove duplicate dot in your naming series
JV-.YY.-.{code}..####
->JV-.YY.-.{code}.####
Updating to
13.35.2
of framework should fix this issue