question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Import error with long and similar filenames

See original GitHub issue

Context

https://github.com/CartoDB/support/issues/967

Steps to Reproduce

  1. Create a file named carto_long_filename_that_almost_matches_another_one_63chars_aaa.csv and import it into CARTO
  2. Create a file named carto_long_filename_that_almost_matches_another_one_63chars_aab.csv and import it into CARTO

Current Result

Error 9999, the import log shows

2017-09-05 14:21:41 UTC: Exception: PG::Error: ERROR:  type "_carto_long_filename_that_almost_matches_another_one_63chars_aa" already exists in schema "xxxxx"

cc @juanignaciosl @rochoa

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
javitoninocommented, Sep 5, 2017

Not exactly. Let me explain a bit more in depth:

  • If the filename is longer than 63 chars, we truncate to 63 chars.
  • If the table name is taken, we add a _1, _2, etc. suffix

So we support filenames of arbitrary length, we just convert them to something we can use on import. There is a bug (this one), where a filename is longer than 63 chars, and the first 62 chars match another table. In this case, it is expected that we import the file with no issues (they have a different name after all), but we are giving an import error instead.

This is clearly a bug, we should never throw an error on import, no matter the filename.

0reactions
kevin-reillycommented, Sep 5, 2017

If we are truncating the 63rd character, we support file names with 62 characters. Right?

Kevin Reilly SVP Product CARTO https://carto.com/ | kevin@carto.com kevin@carto.com (917) 375-2168

On Tue, Sep 5, 2017 at 11:04 AM, Javier Torres notifications@github.com wrote:

We support any amount of characters and automatically truncate them. This is a specific bug with this truncation process, where the filenames are exactly the same except for the 63rd character.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CartoDB/cartodb/issues/12732#issuecomment-327204443, or mute the thread https://github.com/notifications/unsubscribe-auth/ACy_X6dIO4sB3yd1j64NnQ4XD4h84WnKks5sfWL3gaJpZM4PNB6j .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python IOError exception when creating a long file
I am wondering if the file name is just too long for Windows, or if I am doing something wrong. Any tips would...
Read more >
Error importing file with extra long path and file name
My customer is importing (drag / drop) TB's of folders and files. Some have been found to contain very long paths and file...
Read more >
Avoid too long target filenames under import #636 - GitHub
When importing a file, if the filename (or full path) exceeds the max limit in the target location then it'll silently throw an...
Read more >
Bad Filename or Number error during File Import - Kofax
The Bad Filename or Number error can occur during scanning or importing images if the Temporary Image Storage location defined in the batch ......
Read more >
Can't open an Office file that has a long folder name
Workaround · Rename the file so that it has a shorter name. · Rename one or more folders that contain the file so...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found