Forum rules - please read before posting.

Error while importing new CSV file for translation

Hi!

I am trying to create a translation in my game.
I was following this method for importing a new CSV file:
https://www.adventurecreator.org/forum/discussion/10144/tanslation-with-gather-text

But as soon as I click "import text", or I click "Import" under the cog icon, I get an error, showed in the image below.
So, i cannot reach the Import Wizard Window.

I tried exporting the CSV of actual text and writing a few lines of translation and still I get the error. And it happens even if I export the CSV and import it without touching it!

In the image below, my speech manager and the errors ( I tried both on windows and Mac and I get different errors)

https://imgur.com/a/v1UClvy

Comments

  • What are your AC and Unity versions, and can you share the full error messages, stacktraces included?

    The second error suggests that the number of columns varies from row to row. AC will assume them all to match that of the first row - though exporting/importing immediately shouldn't give you such trouble.

    Can you share a portion of the CSV file (or better yet, PM it to me in full), so that it can be examined?

  • Hi! Unity 2020.1.13f and AC 1.72.4

    This is all the error message, with the stacktrace included, that i read if i try to import a csv file that i have just exported after i did a gathering action:

    NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.EditorWindow.set_position (UnityEngine.Rect value) (at <8f44d91b549e47c9883e180579f26ef6>:0)
    AC.ImportWizardWindow.Init (AC.SpeechManager _speechManager, System.String[,] _csvData, System.Int32 _forLanguage) (at Assets/AdventureCreator/Scripts/Speech/ImportWizardWindow.cs:81)
    AC.SpeechManager.ImportTranslation (System.Int32 i) (at Assets/AdventureCreator/Scripts/Managers/SpeechManager.cs:2095)
    AC.SpeechManager.MenuCallback (System.Object obj) (at Assets/AdventureCreator/Scripts/Managers/SpeechManager.cs:945)
    UnityEditor.GenericMenu.CatchMenu (System.Object userData, System.String[] options, System.Int32 selected) (at <8f44d91b549e47c9883e180579f26ef6>:0)

    In pm I will send you the csv to which I have added a translation column.
    Thank you

  • Is the above when importing on Mac or Windows?

    Is the CSV you sent one that's been added to outside of AC? It looks like the formatting is incorrect. See the first line as an example:

    0,Speech,Una macchina della polizia.,A police car."             
    

    There's an extra quotation mark added to the end that looks to be giving the importer trouble.

    What does the original equivalent look like? Actually, PM me your Speech Manager instead - then I can try the whole process myself.

  • Windows.
    Yes, is hase been added outside of AC. But the problem remains if a try with a new one.
    I will send you a csv that I extract at the beginning, without adding anything. What I don't understand is that it gives me an error if I import it ... but it's the same one I extracted!

  • Sorry, but it's the Speech Manager I need - I can't import it otherwise.

  • Sorry, but i don't know how to export the Speech Manager!

  • It's an asset file - click the filename at the top of the Speech Manager tab in the AC Game window. That'll reveal the asset file that stores it's data, which you can then send.

  • https://gofile.io/d/Zizyzt here we are : ) thank you

  • Unfortunately, I get no issue importing the "raw" CSV (the second you sent) into the Speech Manager. This is on both Mac and Windows.

    The first CSV is certainly corrupted - but this looks to be an issue with the file when saved externally.

    Sticking with the raw CSV, here's a couple of things to try:

    1) Open up ImportWizardWindow,cs, and comment out the following line:

    window.position = new Rect (300, 200, 350, 500);
    

    2) Duplicate the raw CSV. In a text editor, cut off all but the first, say, 5 lines. Try importing then. If it works, there may be some issue further down.

  • SOLVED.

    Thank you Chris.

    We actually solved the problem using the MacOS version of unity.
    Apparently the Windows version have some problems that I still don't know.

    But the only problem we had in the Mac Version was the wrong format of the .csv file.

    As soon as we opened the file with Microsoft Excel, the program added automatically some characters to the file, changing it in a wrong format

  • I recommend OpenOffice in the Manual - I find it quite consistent when working with CSV files on both Mac and Windows.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.