OHDSI Home | Forums | Wiki | Github

Usagi - Java Number Format Error

I am attempting to create a mapping with Usagi and getting the following error that is applied to my counts column:

java.lang.NumberFormatException: For Input string: “”

I know it relates to the counts column because I can perform the import if I do not specify a counts column. I have checked and do not believe that there are any blank string values for this column (e.g. I am able to import the file into a dataframe and assign type Int to the column with all rows having a value).

Has anyone run into a similar problem or does anyone have any suggestions?

I am running Usagi on Linux.



Attempted this on a Windows server and got the same error.

Solved by deleting last line of the file, unclear why this caused an error, but will leave this thread up in case others run into this problem in the future.

We are encountering the same problem.
Have checked deleted rows with symbols that may not be acceptable such as asterixis
Have deleted empty rows
Have deleted rows that are no consistent with what is expected
Can anyone help ?

same here. error is unknown

problem fixed, it seems that one cannot has a column with null name.
try that if you have an error

These issues should be fixed with release 1.4.3.

If problems still persist, please open an issue on Github and we can pick it up for a next release.

Hello, the null name column issue exists in 1.4.3. I have just started using usagi recently.

will open an issue if I have the time.

1 Like

Thanks for opening the issue, I will follow-up there and add the resolution to the roadmap

Two things to hint for current and later devs, that is something likely hard to be perfectly fixed

(1) commas of course break your .csv

Check your text columns. Very often there are cases that includes a comma (,) in the text. That is going to break your .csv and render it unreaderable in usagi.

Make sure you replace all the comma (,) with something else

(2) There are cases where whiteRabbit could generate a bunch of lines without text. That would also lead to similar error in Usagi.

Save the file in .csv and open it in something like notepad++, that helps you fix those stupid lines.

That should solve quite some of the problems

One more issue discovered this afternoon is that, there seems to some error with the frequency column. I do not exactly find the issue,

but ignoring the frequency column worked

What about an error like the following when trying to apply previous mappings to usagi concepts:
when clearly in the csv file there is the sourceCode field?

Thanks :slight_smile:

Are you actually selecting the file you think you are? That’s the error you get when you choose, say, the source_to_concept export CSV file.

I was having the same problem
Then I decided to divide the frequency column per million and the problem was solved
Aparently the problem was related to length of frequency number

If there are comma’s in your values, then the value has to be quoted (e.g. I74,"my text, with, commas",123)

Could you maybe share (part of) the file you are trying to import?

What error did Usagi exactly give? It seems we might need to use a different integer type.

305010107,HEMODIÁLISE (MÁXIMO 3 SESSÕES POR SEMANA),Hemodialysis (maximum 3 sessions per week),31429851430


If I reduce the number (per million, e.g.), the problem is solved

Apparently, I did not have problems with commas (I had commas in others rows)

1 Like


Are you trying to import new source codes?
When I started using Usagi, I had the same problem because I was using the “File → Open” instead “File → Import codes”

The maximum value of a Java integer is 2^31-1 = 2,147,483,647. So indeed the frequency you try to import is too big for this data type. We need to handle this properly. Thanks @carlosalcampos for your detailed report.

I reported your issue here: https://github.com/OHDSI/Usagi/issues/148

1 Like

Hello, I am also getting same error and not able to resolve it. Can you please help with this?