# Error in \<FillNtupleFromStream\>: only whitespace and new line can follow the last number on the line

**URL:** <https://root-forum.cern.ch/t/error-in-fillntuplefromstream-only-whitespace-and-new-line-can-follow-the-last-number-on-the-line/34553>\
**Category:** Newbie\
**Created:** [June 12, 2019, 2:17pm UTC](https://root-forum.cern.ch/t/error-in-fillntuplefromstream-only-whitespace-and-new-line-can-follow-the-last-number-on-the-line/34553 "2019-06-12T14:17:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bomben](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/e9a140/32.png) [@bomben](https://root-forum.cern.ch/u/bomben)\
**Post date:** [June 12, 2019, 2:17pm UTC](https://root-forum.cern.ch/t/error-in-fillntuplefromstream-only-whitespace-and-new-line-can-follow-the-last-number-on-the-line/34553/1 "2019-06-12T14:17:51Z")

</div>

Dear all,  
I get the error I have indicated in the subject when using TNtuple::ReadFile.  
Here is what I am doing:

```auto
root [0] TNtuple nt("nt","","%d %d %d %f")
root [1] nt.ReadFile("Potential_map.txt")

```

and I get:

> Error in : only whitespace and new line can follow the last number on the line  
> (long long) 0

In attachment you can find the txt file I am trying to read. I have created it using python; both the python script and the root session are run in Linux/OSX machine but the error is  
always the same. In attachment the

> Potential\_map.txt  
> file[Potential\_map.txt](https://root-forum.cern.ch/uploads/default/original/3X/8/6/8614f80e2158546823463d480e1eef104f597909.txt) (1.2 KB)

Any help will be greatly appreciated.

Best regards,  
Marco Bomben

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [June 12, 2019, 2:31pm UTC](https://root-forum.cern.ch/t/error-in-fillntuplefromstream-only-whitespace-and-new-line-can-follow-the-last-number-on-the-line/34553/2 "2019-06-12T14:31:01Z")

</div>

```auto
{
  TTree *t = new TTree("t", "my tree");
  t->ReadFile("Potential_map.txt", "i/I:j:k:v/F");
  t->Print();
}

```

---

<div class="post-metadata">

**Author:** ![bomben](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/e9a140/32.png) [@bomben](https://root-forum.cern.ch/u/bomben)\
**Post date:** [June 12, 2019, 2:45pm UTC](https://root-forum.cern.ch/t/error-in-fillntuplefromstream-only-whitespace-and-new-line-can-follow-the-last-number-on-the-line/34553/3 "2019-06-12T14:45:50Z")

</div>

Thanks a lot Wile E Coyote!  
Could you please tell me why the code based on TNtuple was not working?  
Otherwise the topic can be closed.  
Thanks again and kind regards,  
Marco Bomben
