# Opening a file in update mode causes Error in \<TBasket::Streamer\>: The value of fNbytes is incorrect

**URL:** <https://root-forum.cern.ch/t/opening-a-file-in-update-mode-causes-error-in-tbasket-streamer-the-value-of-fnbytes-is-incorrect/43340>\
**Category:** ROOT\
**Tags:** tree\
**Created:** [February 1, 2021, 2:28am UTC](https://root-forum.cern.ch/t/opening-a-file-in-update-mode-causes-error-in-tbasket-streamer-the-value-of-fnbytes-is-incorrect/43340 "2021-02-01T02:28:35Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![jvavrek1](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jvavrek1/32/24714_2.png) [@jvavrek1](https://root-forum.cern.ch/u/jvavrek1)\
**Post date:** [February 5, 2021, 5:48pm UTC](https://root-forum.cern.ch/t/opening-a-file-in-update-mode-causes-error-in-tbasket-streamer-the-value-of-fnbytes-is-incorrect/43340/8 "2021-02-05T17:48:33Z")

</div>

The error was:

```auto
/Users/jvavrek/ta_stj/src/RunAction.cc:154:6: error: no matching member function for call to 'Write'
  f->Write(primaries, "primaries");
  ~~~^~~~~
/Users/jvavrek/root/install/include/TFile.h:279:24: note: candidate function not viable: no known conversion from
      'std::vector<unsigned long>' to 'const char *' for 1st argument
   virtual Int_t Write(const char *name=0, Int_t opt=0, Int_t bufsiz=0);
                       ^
/Users/jvavrek/root/install/include/TFile.h:280:24: note: candidate function not viable: no known conversion from
      'std::vector<unsigned long>' to 'const char *' for 1st argument
   virtual Int_t Write(const char *name=0, Int_t opt=0, Int_t bufsiz=0) const;

```

Based on [this post](https://root-forum.cern.ch/t/writting-and-getting-a-std-vector-from-a-tfile/26207) should it be `WriteObject` instead of `Write`?

---

_[View the full topic](https://root-forum.cern.ch/t/opening-a-file-in-update-mode-causes-error-in-tbasket-streamer-the-value-of-fnbytes-is-incorrect/43340)._
