Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid JSON: at 266: json requires object keys to be strings #109

Open
dufresnep opened this issue Sep 24, 2023 · 4 comments
Open

Invalid JSON: at 266: json requires object keys to be strings #109

dufresnep opened this issue Sep 24, 2023 · 4 comments

Comments

@dufresnep
Copy link

paul@fedora:~/myraku/comp/FreeDOS--Packager/lib/FreeDOS$ fez refresh
Invalid JSON: at 266: json requires object keys to be strings
  in sub from-j at /home/paul/.raku/sources/61DF8C254BC17601DDB7E087D2BE0DC37A1C9AE0 (Fez::Util::Json) line 4
  in sub MAIN at /home/paul/.raku/sources/E70D075AB5A85C98F4D80EE2659F703F171B8E3E (Fez::CLI) line 768
  in block <unit> at /home/paul/.raku/resources/1B3EFC55F4CBF2A17A7C76FEE8A1DDEFB16A8156 line 4
  in sub MAIN at /home/paul/.raku/bin/fez line 3
  in block <unit> at /home/paul/.raku/bin/fez line 1

paul@fedora:~/myraku/comp/FreeDOS--Packager/lib/FreeDOS1$

Zef was installed yesterday... for the first time (so I might have given strange input, learning).

Discover just before with:

paul@fedora:~/myraku/comp/FreeDOS--Packager/lib/FreeDOS1$ fez dep Archive::SimpleZip
Invalid JSON: at 266: json requires object keys to be strings
  in sub from-j at /home/paul/.raku/sources/61DF8C254BC17601DDB7E087D2BE0DC37A1C9AE0 (Fez::Util::Json) line 4
  in sub MAIN at /home/paul/.raku/sources/E70D075AB5A85C98F4D80EE2659F703F171B8E3E (Fez::CLI) line 964
  in sub MAIN at /home/paul/.raku/sources/E70D075AB5A85C98F4D80EE2659F703F171B8E3E (Fez::CLI) line 955
  in block <unit> at /home/paul/.raku/resources/1B3EFC55F4CBF2A17A7C76FEE8A1DDEFB16A8156 line 4
  in sub MAIN at /home/paul/.raku/bin/fez line 3
  in block <unit> at /home/paul/.raku/bin/fez line 1

Moving to ~/myraku/comp/FreeDOS--Packager1$ directory did not fixed the issue.

I don't know why there is a '1' at the end of my prompt! It appears only when type fez commands.
Was not having problems yesterday night... computer did stay open all night, was trying to continue this morning.

@dufresnep
Copy link
Author

Problem persist after reboot. Now having '2' at the end of prompt, rather than '1'.

@dufresnep
Copy link
Author

Other commands now show (at the end of prompt) what seems exit code:

paul@fedora:~$ fez v
>>= fez version: 55
paul@fedora:~$ fez refresh
=<< FATAL: could not find META6.json
paul@fedora:~1$ pwd
/home/paul
paul@fedora:~$ cd myraku/
paul@fedora:~/myraku$ ls
 comp                gtk1.raku   menubar.raku   square.raku  'test (1)'   zef
 compress_dir.raku   lib         pkgout.zip     test          test.zip
paul@fedora:~/myraku$ ls
 comp                gtk1.raku   menubar.raku   square.raku  'test (1)'   zef
 compress_dir.raku   lib         pkgout.zip     test          test.zip
paul@fedora:~/myraku$ ls
 comp                gtk1.raku   menubar.raku   square.raku  'test (1)'   zef
 compress_dir.raku   lib         pkgout.zip     test          test.zip
paul@fedora:~/myraku$ ls
 comp                gtk1.raku   menubar.raku   square.raku  'test (1)'   zef
 compress_dir.raku   lib         pkgout.zip     test          test.zip
paul@fedora:~/myraku$ mkdir test
mkdir: impossible de créer le répertoire « test »: Le fichier existe
paul@fedora:~/myraku1$ ls test
smiley-main
paul@fedora:~/myraku$ mkdir test2
paul@fedora:~/myraku$ cde test2
bash: cde: commande inconnue...
paul@fedora:~/myraku127$ cde test2
bash: cde: commande inconnue...
paul@fedora:~/myraku127$ cd allo
bash: cd: allo: Aucun fichier ou dossier de ce type
paul@fedora:~/myraku1$ cde
bash: cde: commande inconnue...
paul@fedora:~/myraku127$ 

@dufresnep
Copy link
Author

dufresnep commented Sep 24, 2023

It looks like the error code at the end of prompt is a new feature, not related to the problem.

@dufresnep dufresnep changed the title Invalid JSON: at 266: json requires object keys to be strings (strange '1') at the end of prompt Invalid JSON: at 266: json requires object keys to be strings Sep 24, 2023
@dufresnep
Copy link
Author

dufresnep commented Sep 24, 2023

Oh... fixed I think...
Because fez did not seems to have a command to remove a module, I did manually and had a ',' at the end that needed to be removed:

  "name": "FreeDOS--Packager",
  "provides": {
    "FreeDOS::Packager": "lib/FreeDOS/Packager.rakumod",
    "help": "lib/help.rakumod",

after removing the ',' at the end of help line, seems fixed.

Edit: Oh I think I get it... you add and remove .rakumod files, and then when doing 'fez refresh' it updates the META6.json file accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant