easy_localization_generator icon indicating copy to clipboard operation
easy_localization_generator copied to clipboard

RangeError (index): Invalid value: Only valid value is 0: 1

Open TungWang opened this issue 1 year ago • 10 comments

截圖 2023-09-12 下午3 26 29

I got this error. Please help me to solve it. Thanks a lot.

TungWang avatar Sep 12 '23 07:09 TungWang

Hi @TungWang, can you provide some code or context to explain this issue? But with my experience, I think:

  1. You should check your google sheet, it must be public.
  2. If it is already public, you should check your CSV file, which was generated with easy_localization_generator. Check the format of this file.

rinlv avatar Sep 17 '23 09:09 rinlv

Hi @TungWang, can you provide some code or context to explain this issue? But with my experience, I think:

  1. You should check your google sheet, it must be public.
  2. If it is already public, you should check your CSV file, which was generated with easy_localization_generator. Check the format of this file.

Hi @rinlv , I found the problem. When I use "zh_Hant", I got the error. After I changed "zh_Hant" to "zh_tw", the error gone. So, the next question is: why can't I use "zh_Hant"?

TungWang avatar Sep 20 '23 02:09 TungWang

@TungWang it may be caused by LF line separator. #14

lwj1994 avatar Oct 18 '23 11:10 lwj1994

@TungWang it may be caused by LF line separator. #14

@lwj1994 Thanks for your support. @TungWang did it work for you?

rinlv avatar Nov 06 '23 11:11 rinlv

@TungWang it may be caused by LF line separator. #14

@lwj1994 Thanks for your support. @TungWang did it work for you?

How do i try this commit? Would you please teach me? I modified "dev_dependencies" like below: 截圖 2023-12-28 下午5 11 07

I got some error message because of the version problem.

"Because no versions of easy_localization_loader match >2.0.0 <2.0.1 and easy_localization_loader >=2.0.1 depends on http ^1.1.0, easy_localization_loader >2.0.0 requires http ^1.1.0. And because easy_localization_loader 2.0.0 depends on http ^1.0.0 and every version of easy_localization_generator from git depends on http ^0.13.5, easy_localization_generator from git is incompatible with easy_localization_loader >=2.0.0. So, because spaces_go depends on both easy_localization_loader ^2.0.0 and easy_localization_generator from git, version solving failed."

TungWang avatar Dec 28 '23 09:12 TungWang

@TungWang

pub add this:

  easy_localization_generator:
    git:
      url: https://github.com/lwj1994/easy_localization_generator
      ref: dev

lwj1994 avatar Dec 28 '23 09:12 lwj1994

@TungWang

pub add this:

  easy_localization_generator:
    git:
      url: https://github.com/lwj1994/easy_localization_generator
      ref: dev

I failed, because easy_localization_generator from git depends on http ^0.13.5. 截圖 2023-12-28 下午5 23 05

TungWang avatar Dec 28 '23 09:12 TungWang

@TungWang pub add this:

  easy_localization_generator:
    git:
      url: https://github.com/lwj1994/easy_localization_generator
      ref: dev

I failed, because easy_localization_generator from git depends on http ^0.13.5. 截圖 2023-12-28 下午5 23 05

add it on top:

dependency_overrides:
  http: 1.1.0

lwj1994 avatar Dec 28 '23 09:12 lwj1994

@TungWang pub add this:

  easy_localization_generator:
    git:
      url: https://github.com/lwj1994/easy_localization_generator
      ref: dev

I failed, because easy_localization_generator from git depends on http ^0.13.5. 截圖 2023-12-28 下午5 23 05

add it on top:

dependency_overrides:
  http: 1.1.0

Unfortunately, I still get RangeError.

TungWang avatar Dec 29 '23 05:12 TungWang

@TungWang pub add this:

  easy_localization_generator:
    git:
      url: https://github.com/lwj1994/easy_localization_generator
      ref: dev

I failed, because easy_localization_generator from git depends on http ^0.13.5. 截圖 2023-12-28 下午5 23 05

add it on top:

dependency_overrides:
  http: 1.1.0

Unfortunately, I still get RangeError.

do you delete the pubspec.lock firstly? maybe cause by cache

lwj1994 avatar Jan 04 '24 03:01 lwj1994