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

json.decoder.JSONDecodeError on Windows 10 with Python 3.7.0 32-bit #44

Open
clc14 opened this issue Jul 7, 2018 · 4 comments
Open

Comments

@clc14
Copy link

clc14 commented Jul 7, 2018

I get this error when I try to run mech:

mech init bento/ubuntu-14.04
Initializing mech
Traceback (most recent call last):
File "C:\Users\clc\AppData\Local\Programs\Python\Python37-32\Scripts\mech-script.py", line 11, in
load_entry_point('mech==0.7.6', 'console_scripts', 'mech')()
File "c:\users\clc\appdata\local\programs\python\python37-32\lib\site-packages\mech_main_.py", line 39, in main
return Mech(arguments)()
File "c:\users\clc\appdata\local\programs\python\python37-32\lib\site-packages\mech\command.py", line 89, in call
obj = klass(arguments)
File "c:\users\clc\appdata\local\programs\python\python37-32\lib\site-packages\mech\mech.py", line 572, in init
if utils.init_mechfile(instance_name, url, name=name, version=version, requests_kwargs=requests_kwargs):
File "c:\users\clc\appdata\local\programs\python\python37-32\lib\site-packages\mech\utils.py", line 471, in init_mechfile
path = index_active_instance(instance_name)
File "c:\users\clc\appdata\local\programs\python\python37-32\lib\site-packages\mech\utils.py", line 458, in index_active_instance
'path': path,
File "c:\users\clc\appdata\local\programs\python\python37-32\lib\site-packages\mech\utils.py", line 201, in settle_instance
instances = json.loads(uncomment(fp.read()))
File "c:\users\clc\appdata\local\programs\python\python37-32\lib\json_init_.py", line 348, in loads
return _default_decoder.decode(s)
File "c:\users\clc\appdata\local\programs\python\python37-32\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "c:\users\clc\appdata\local\programs\python\python37-32\lib\json\decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 2 column 3 (char 4)

@clc14
Copy link
Author

clc14 commented Jul 7, 2018

Deleted the .mech directory, and now it's working.

But now it creates four different directories with the disk files:

07/07/2018 02:32 PM

13307551143
07/07/2018 02:33 PM 13307551145
07/07/2018 02:33 PM 13307551146
07/07/2018 02:33 PM 13307551147
07/07/2018 02:32 PM boxes
07/07/2018 02:32 PM data

I can get it to work by copying the vmdk's to the 13307551147 folder, where the .vmx file is

@clc14
Copy link
Author

clc14 commented Jul 7, 2018

python -m tarfile -l vmware_desktop.box
13307551147/Vagrantfile
13307551143/disk-s001.vmdk
13307551145/disk-s002.vmdk
13307551146/disk-s007.vmdk
...
13307551147/disk.vmdk
13307551147/metadata.json
13307551147/ubuntu-14.04-amd64.nvram
13307551147/ubuntu-14.04-amd64.vmsd
13307551147/ubuntu-14.04-amd64.vmx
13307551147/ubuntu-14.04-amd64.vmxf

while running gnu tar -xvf puts them all in the same directory

@clc14
Copy link
Author

clc14 commented Jul 7, 2018

This is only happening with bento images

@Kronuz
Copy link
Collaborator

Kronuz commented Oct 26, 2018

This is weird, it seems the error comes from reading the index file. Could you please share your ~/.mech/data/index When the error shows.

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

2 participants