Search Unity

Question Can not upload table to google sheets

Discussion in 'Localization Tools' started by syjgin, Nov 8, 2021.

  1. syjgin

    syjgin

    Joined:
    Feb 13, 2015
    Posts:
    136
    Hello. I'm trying to setup google sheets integration: oauth 2.0 completed successfully, but after trying to sync localization table there are following error:
    Code (CSharp):
    1. InvalidOperationException: Stack empty.
    2. System.Collections.Generic.Stack`1[T].ThrowForEmptyStack () (at <e53907b070fc42a5ad424d2e589e5ab0>:0)
    3. System.Collections.Generic.Stack`1[T].Pop () (at <e53907b070fc42a5ad424d2e589e5ab0>:0)
    4. UnityEditor.PropertyDrawer.OnGUISafe (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at /home/bokken/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/PropertyDrawer.cs:24)
    5. UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.Rect visibleArea) (at /home/bokken/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:173)
    6. UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren) (at /home/bokken/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:134)
    7. UnityEditor.EditorGUI.PropertyFieldInternal (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren) (at /home/bokken/buildslave/unity/build/Editor/Mono/EditorGUI.cs:7118)
    8. UnityEditor.EditorGUI.PropertyField (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren) (at /home/bokken/buildslave/unity/build/Editor/Mono/EditorGUI.cs:8580)
    9. UnityEditor.Localization.UI.ReorderableListExtended.DrawElement (UnityEngine.Rect rect, System.Int32 idx, System.Boolean isActive, System.Boolean isFocused) (at Library/PackageCache/com.unity.localization@1.0.5/Editor/UI/Utility/ReorderableListExtended.cs:81)
    10. UnityEditorInternal.ReorderableList.DoListElements (UnityEngine.Rect listRect, UnityEngine.Rect visibleRect) (at /home/bokken/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:943)
    11. UnityEditorInternal.ReorderableList.DoLayoutList () (at /home/bokken/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:723)
    12. UnityEditor.Localization.UI.LocalizationTableCollectionEditor.OnInspectorGUI () (at Library/PackageCache/com.unity.localization@1.0.5/Editor/UI/Tables/LocalizationTableCollectionEditor.cs:211)
    13. UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0.<CreateIMGUIInspectorFromEditor>b__0 () (at /home/bokken/buildslave/unity/build/ModuleOverrides/com.unity.ui/Editor/Inspector/InspectorElement.cs:636)
    14. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /home/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
    15.  
    Editor platform is Linux, Unity ersion is 2021.2.1f1.
    Google sheets integration is still not production ready?
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,292
    I can't see anything in the call stack, something to do with the property drawers it seems.
    Do you have any other error messages before this? Can you share the log file?
    Did this happen during a sync?
     
  3. syjgin

    syjgin

    Joined:
    Feb 13, 2015
    Posts:
    136
    After attempt to create table, empty table is created. Mapping is not changing this behavior
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,292
    Does the error happen every time? Can you please file a bug report, I'll need to look closer into it.
     
  5. syjgin

    syjgin

    Joined:
    Feb 13, 2015
    Posts:
    136
    No, before this there was no any error message. This happen after clicking "Create New Spreadsheet" button in the initial sync.
     

    Attached Files:

  6. syjgin

    syjgin

    Joined:
    Feb 13, 2015
    Posts:
    136
    karl_jones likes this.
  7. IAndrewNovak

    IAndrewNovak

    Joined:
    Nov 29, 2013
    Posts:
    118
    Same issue after clicking "Open" CSV file.

    Also, I find weird logic. Opened CSV file with row 3 with texts -> row 3 has data in unity string table collection -> Opened CSV file without row 3 -> row 3 not cleared in string table collection (only new ids added working?)
     
  8. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,292
    When we do an import we just patch across the new values, we dont do a clear before importing. Could you please file a bug report with this use case so we can consider it?
     
  9. IAndrewNovak

    IAndrewNovak

    Joined:
    Nov 29, 2013
    Posts:
    118
    Ok.

    Do I understand correctly that in the case of normal execution, row 4 should have been cleared (like in the last imported CSV)?
     
  10. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,292
    We dont remove missing keys with CSV like we do with Google Sheets so this could be a bug. Could you file a bug report so I can better understand what it is you are trying to achieve?
     
  11. syjgin

    syjgin

    Joined:
    Feb 13, 2015
    Posts:
    136
    @karl_jones Sorry, this issue is not linked with google drive connection itself: I just misunderstood, that I have to manually add column settings, document and sheet ids into connection script. After this information was filled, connection become working perfectly, but initial error message is still appears every time I try to sync with drive
     
  12. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,292
    Co
    Could you please file a bug report so we can look into it?
     
  13. IAndrewNovak

    IAndrewNovak

    Joined:
    Nov 29, 2013
    Posts:
    118
    karl_jones likes this.
  14. syjgin

    syjgin

    Joined:
    Feb 13, 2015
    Posts:
    136
    karl_jones likes this.