[GH-ISSUE #200] Small glitch in the code ? #582

Closed
opened 2026-03-11 12:20:17 +03:00 by kerem · 8 comments
Owner

Originally created by @Kia0ra on GitHub (Jan 7, 2024).
Original GitHub issue: https://github.com/007revad/Synology_HDD_db/issues/200

Hi,

Thanks a lot for your scripts, they are awesome !
I have just noticed a small parse error while running it, I am sharing it with you.

`root@nas:/volume1/script# ./syno_hdd_db.sh -nr --showedits
Synology_HDD_db v3.3.75
DS220+ DSM 7.2.1-69057-3
StorageManager 1.0.0-0017

Using options: -nr --showedits
Running from: /volume1/script/syno_hdd_db.sh

HDD/SSD models found: 1
WD160EDGZ-11B2DA0,85.00A85

No M.2 drives found

No M.2 PCIe cards found

No Expansion Units found

WD160EDGZ-11B2DA0 already exists in ds220+_host_v7.db

Support disk compatibility already enabled.

Support memory compatibility already disabled.

Max memory already set to 18 GB.

Drive db auto updates already disabled.

parse error: Expected value before ',' at line 1, column 96319

DSM successfully checked disk compatibility.

You may need to reboot the Synology to see the changes.
`

Originally created by @Kia0ra on GitHub (Jan 7, 2024). Original GitHub issue: https://github.com/007revad/Synology_HDD_db/issues/200 Hi, Thanks a lot for your scripts, they are awesome ! I have just noticed a small parse error while running it, I am sharing it with you. `root@nas:/volume1/script# ./syno_hdd_db.sh -nr --showedits Synology_HDD_db v3.3.75 DS220+ DSM 7.2.1-69057-3 StorageManager 1.0.0-0017 Using options: -nr --showedits Running from: /volume1/script/syno_hdd_db.sh HDD/SSD models found: 1 WD160EDGZ-11B2DA0,85.00A85 No M.2 drives found No M.2 PCIe cards found No Expansion Units found WD160EDGZ-11B2DA0 already exists in ds220+_host_v7.db Support disk compatibility already enabled. Support memory compatibility already disabled. Max memory already set to 18 GB. Drive db auto updates already disabled. **parse error: Expected value before ',' at line 1, column 96319** DSM successfully checked disk compatibility. You may need to reboot the Synology to see the changes. `
kerem closed this issue 2026-03-11 12:20:22 +03:00
Author
Owner

@007revad commented on GitHub (Jan 7, 2024):

I suspect if you run it again with --showedits it will show the same error.

And if you run it without --showedits it won't show the error.

Does the following command give the same error?

jq . ds220+_host_v7.db | grep -A 11 WD160EDGZ-11B2DA0

If it does give the same error can you attach a zipped copy of your ds220+_host_v7.db file.

You can copy the file to the script shared folder with:

sudo cp /var/lib/disk-compatibility/ds220+_host_v7.db /volume1/script/ds220+_host_v7.db
<!-- gh-comment-id:1880005948 --> @007revad commented on GitHub (Jan 7, 2024): I suspect if you run it again with --showedits it will show the same error. And if you run it without --showedits it won't show the error. Does the following command give the same error? ``` jq . ds220+_host_v7.db | grep -A 11 WD160EDGZ-11B2DA0 ``` If it does give the same error can you attach a zipped copy of your ds220+_host_v7.db file. You can copy the file to the script shared folder with: ``` sudo cp /var/lib/disk-compatibility/ds220+_host_v7.db /volume1/script/ds220+_host_v7.db ```
Author
Owner

@timekone commented on GitHub (Jan 7, 2024):

I've encountered a similar error. It only happens when running with --showedits.

<!-- gh-comment-id:1880094360 --> @timekone commented on GitHub (Jan 7, 2024): I've encountered a similar error. It only happens when running with --showedits.
Author
Owner

@Kia0ra commented on GitHub (Jan 7, 2024):

I suspect if you run it again with --showedits it will show the same error.

Yes

And if you run it without --showedits it won't show the error.

Exact

Does the following command give the same error?

jq . ds220+_host_v7.db | grep -A 11 WD160EDGZ-11B2DA0

root@nas:/volume1/scripts# jq . ds220+_host_v7.db | grep -A 11 WD160EDGZ-11B2DA0 parse error: Expected value before ',' at line 1, column 96319
Exact same error

If it does give the same error can you attach a zipped copy of your ds220+_host_v7.db file.

You can copy the file to the script shared folder with:

sudo cp /var/lib/disk-compatibility/ds220+_host_v7.db /volume1/script/ds220+_host_v7.db

You can find the .db file in attachment

Thanks !

ds220+_host_v7.db.zip

<!-- gh-comment-id:1880160888 --> @Kia0ra commented on GitHub (Jan 7, 2024): > I suspect if you run it again with --showedits it will show the same error. **Yes** > And if you run it without --showedits it won't show the error. **Exact** > Does the following command give the same error? > > ``` > jq . ds220+_host_v7.db | grep -A 11 WD160EDGZ-11B2DA0 > ``` **`root@nas:/volume1/scripts# jq . ds220+_host_v7.db | grep -A 11 WD160EDGZ-11B2DA0 parse error: Expected value before ',' at line 1, column 96319 ` Exact same error** > > If it does give the same error can you attach a zipped copy of your ds220+_host_v7.db file. > > You can copy the file to the script shared folder with: > > ``` > sudo cp /var/lib/disk-compatibility/ds220+_host_v7.db /volume1/script/ds220+_host_v7.db > ``` **You can find the .db file in attachment** Thanks ! [ds220+_host_v7.db.zip](https://github.com/007revad/Synology_HDD_db/files/13854852/ds220%2B_host_v7.db.zip)
Author
Owner

@007revad commented on GitHub (Jan 7, 2024):

Ok, I've found the issue. My script has added an extra comma so the file ends in ,,"nas_model":"ds220+"} when it should end in ,"nas_model":"ds220+"}

I'll update the script to prevent that, and fix it in the db file for people who've already run Synology_HDD_db v3.3.75

<!-- gh-comment-id:1880183393 --> @007revad commented on GitHub (Jan 7, 2024): Ok, I've found the issue. My script has added an extra comma so the file ends in `,,"nas_model":"ds220+"}` when it should end in `,"nas_model":"ds220+"}` I'll update the script to prevent that, and fix it in the db file for people who've already run Synology_HDD_db v3.3.75
Author
Owner

@007revad commented on GitHub (Jan 7, 2024):

This new version v3.4.76 should work correctly with the -s or --showedits option. It also edits the ,db files to fix the ,, left from v3.3.75

https://github.com/007revad/Synology_HDD_db/releases/tag/v3.4.76

<!-- gh-comment-id:1880196205 --> @007revad commented on GitHub (Jan 7, 2024): This new version v3.4.76 should work correctly with the -s or --showedits option. It also edits the ,db files to fix the ,, left from v3.3.75 https://github.com/007revad/Synology_HDD_db/releases/tag/v3.4.76
Author
Owner

@Kia0ra commented on GitHub (Jan 8, 2024):

I think there's still a problem with the sed command :

root@nas:/volume1/scripts# ./syno_hdd_db.sh -nr  --showedits
Synology_HDD_db v3.4.76
DS220+ DSM 7.2.1-69057-3 
StorageManager 1.0.0-0017

Using options: -nr --showedits
Running from: /volume1/scripts/syno_hdd_db.sh

HDD/SSD models found: 1
WD160EDGZ-11B2DA0,85.00A85

No M.2 drives found

No M.2 PCIe cards found

No Expansion Units found

sed: no input files
WD160EDGZ-11B2DA0 already exists in ds220+_host_v7.db

Support disk compatibility already enabled.

Support memory compatibility already disabled.

Max memory already set to 18 GB.

Drive db auto updates already disabled.

parse error: Expected value before ',' at line 1, column 96319

DSM successfully checked disk compatibility.

You may need to reboot the Synology to see the changes.
<!-- gh-comment-id:1880420823 --> @Kia0ra commented on GitHub (Jan 8, 2024): I think there's still a problem with the sed command : ``` root@nas:/volume1/scripts# ./syno_hdd_db.sh -nr --showedits Synology_HDD_db v3.4.76 DS220+ DSM 7.2.1-69057-3 StorageManager 1.0.0-0017 Using options: -nr --showedits Running from: /volume1/scripts/syno_hdd_db.sh HDD/SSD models found: 1 WD160EDGZ-11B2DA0,85.00A85 No M.2 drives found No M.2 PCIe cards found No Expansion Units found sed: no input files WD160EDGZ-11B2DA0 already exists in ds220+_host_v7.db Support disk compatibility already enabled. Support memory compatibility already disabled. Max memory already set to 18 GB. Drive db auto updates already disabled. parse error: Expected value before ',' at line 1, column 96319 DSM successfully checked disk compatibility. You may need to reboot the Synology to see the changes. ```
Author
Owner

@007revad commented on GitHub (Jan 8, 2024):

I guess it helps if I tell sed which files to edit :(

All fixed now: https://github.com/007revad/Synology_HDD_db/releases/tag/v3.4.77

<!-- gh-comment-id:1880514954 --> @007revad commented on GitHub (Jan 8, 2024): I guess it helps if I tell sed which files to edit :( All fixed now: https://github.com/007revad/Synology_HDD_db/releases/tag/v3.4.77
Author
Owner

@Kia0ra commented on GitHub (Jan 8, 2024):

It definitely helps ;)

Thanks for the support and reactiveness !

bash-4.4# ./syno_hdd_db.sh -nr --showedits
Synology_HDD_db v3.4.77
DS220+ DSM 7.2.1-69057-3 
StorageManager 1.0.0-0017

Using options: -nr --showedits
Running from: /volume1/scripts/syno_hdd_db.sh

HDD/SSD models found: 1
WD160EDGZ-11B2DA0,85.00A85

No M.2 drives found

No M.2 PCIe cards found

No Expansion Units found

WD160EDGZ-11B2DA0 already exists in ds220+_host_v7.db

Support disk compatibility already enabled.

Support memory compatibility already disabled.

Max memory already set to 18 GB.

Drive db auto updates already disabled.

    "WD160EDGZ-11B2DA0": {
      "85.00A85": {
        "compatibility_interval": [
          {
            "compatibility": "support",
            "not_yet_rolling_status": "support",
            "fw_dsm_update_status_notify": false,
            "barebone_installable": true,
            "smart_test_ignore": false,
            "smart_attr_ignore": false
          }
        ]

DSM successfully checked disk compatibility.

You may need to reboot the Synology to see the changes.
<!-- gh-comment-id:1881750556 --> @Kia0ra commented on GitHub (Jan 8, 2024): It definitely helps ;) Thanks for the support and reactiveness ! ``` bash-4.4# ./syno_hdd_db.sh -nr --showedits Synology_HDD_db v3.4.77 DS220+ DSM 7.2.1-69057-3 StorageManager 1.0.0-0017 Using options: -nr --showedits Running from: /volume1/scripts/syno_hdd_db.sh HDD/SSD models found: 1 WD160EDGZ-11B2DA0,85.00A85 No M.2 drives found No M.2 PCIe cards found No Expansion Units found WD160EDGZ-11B2DA0 already exists in ds220+_host_v7.db Support disk compatibility already enabled. Support memory compatibility already disabled. Max memory already set to 18 GB. Drive db auto updates already disabled. "WD160EDGZ-11B2DA0": { "85.00A85": { "compatibility_interval": [ { "compatibility": "support", "not_yet_rolling_status": "support", "fw_dsm_update_status_notify": false, "barebone_installable": true, "smart_test_ignore": false, "smart_attr_ignore": false } ] DSM successfully checked disk compatibility. You may need to reboot the Synology to see the changes. ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Synology_HDD_db#582
No description provided.