Help My Notecard is Full!

When I try to send a note file to my notecard, I receive the following error:

 "error adding note: can't exceed 80% of filesystem (currently 85)"

How do I resolve this?

It seems like a bunch of data has been added to the Notecard, but it has never been offloaded to the Notehub on the cloud.

I’m guessing that the note.add statement has been used repeatedly on a QO-file, and that the Notecard hasn’t synced with the Notehub. So the data is persisting in the QO-file, and it has run out of space.

There are a couple of options.

  1. Sync the Notecard with Notehub (assuming connectivity is available)

{"req":"hub.sync","allow":true}

will force a sync.

  1. If it’s not syncing, double check the hub mode. Execute
    {"req":"hub.get"}

If the response includes "mode":"off" , then at the very least, enable the modem with

{"req":"hub.set","mode":"minimum"}

  1. If it’s not syncing because there’s no network available, we can delete the data from the Notecard.

a. Factory reset with data refresh - simpliest approach, but requires reconfiguring the Notecard.

{"req":"card.restore","delete":true}

OR

factory-reset

if you are using the Notecard Playground: Notecard Playground - Blues Developers

b. Delete the Notefile(s)
file Requests - API Reference - Blues Developers

You can select which Notefiles you want to delete.

{"req":"file.delete","files":["data.qo"]}

deletes the default QO-file that is created when using note.add

To view the files, you can use the file.changes request :file Requests - API Reference - Blues Developers

OR

explore

from the Notecard Playground

c. Delete individual Notes.
This is more involved and may require some scripting. You can view which Notes are in a file using
{"req":"note.changes"}

Then you can delete specific Notes using

{"req":"note.delete","file":"data.qo","note":"<note-uid>"}

where <note-uid> is the identifier returned by note.changes

> explore data.qo   <--- View contents in Notecard Playground using explore
~ data.qo: 2 Notes 
~  Age   ID      Body (Payload)       
~  7s    OQ660   {"message":"hello"} 
~  11s   QS88    {"message":"hello"} 
> {"req":"note.changes","file":"data.qo"}  <---- Get contents of data.qo
{ 
 "notes": { 
  "QS88": { 
   "body": { 
    "message": "hello" 
   }, 
   "time": 1678844728 
  }, 
  "OQ660": { 
   "body": { 
    "message": "hi" 
   }, 
   "time": 1678844732 
  } 
 }, 
 "total": 2 
} 
> {"req":"note.delete","file":"data.qo","note":"QS88"}   <---- Delete the first Note
{} 
> {"req":"note.changes","file":"data.qo"} <--- Confirm the first Note is deleted
{ 
 "notes": { 
  "OQ660": { 
   "body": { 
    "message": "hi" 
   }, 
   "time": 1678844732 
  } 
 }, 
 "total": 1 
}

Hopefully one of the above will help you out!

1 Like