mechboxes / mech

Easy command line virtual machines for VMWare
https://mechboxes.github.io/mech/
MIT License
311 stars 49 forks source link

Mech up and init not working window 10 and Workstation 14 #48

Open sunil-bagde opened 6 years ago

sunil-bagde commented 6 years ago
mech init 
mech up 
// not working
  File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\Scripts\mech-script.py", line 11, in <module>
    load_entry_point('mech==0.7.6', 'console_scripts', 'mech')()
  File "c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\mech\__main__.py", line 39, in main
    return Mech(arguments)()
  File "c:\users\user\appdata\local\programs\python\python37-32\lib\site-
packages\mech\command.py", line 89, in __call__
    obj = klass(arguments)
  File "c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\mech\mech.py", line 569, in init
    if utils.init_mechfile(instance_name, url, name=name, version=version, requests_kwargs=requests_kwargs):
  File "c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\mech\utils.py", line 468, in init_mechfile
    path = index_active_instance(instance_name)
  File "c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\mech\utils.py", line 457, in index_active_instance
    'path': path,
  File "c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\mech\utils.py", line 200, in settle_instance
    instances = json.loads(uncomment(fp.read()))
  File "c:\users\user\appdata\local\programs\python\python37-32\lib\json\__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "c:\users\user\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\user\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)
Kronuz commented 6 years ago

This is a dup of #44. Could you please share your ~/.mech/data/index file? I’m not sure where home is in Windows 10; but maybe in c:\Users\Username\.mech\data\index?

Ciberth commented 6 years ago

@Kronuz I'm having the same issue. I would really love to get some things working on windows 10 (to use mech in my lessons as we use vmware instead of virtualbox).

I have some weird behaviour when trying to create more than 1 machine in general (even i different folders).

To answer your question de index file under data has the following content:

{

(Open curly bracket and an empty line). Running other commands isn't possible unless I delete the .mech file under home. Hopefully we can figure out the problem.

Thanks for the work on mech!

Kronuz commented 6 years ago

We’re you upping several mech boxes simultaneously? I think Windows might no cope well while writing to the index when updating it from several mech processes at the same time

Ciberth commented 6 years ago

Correct I think something like that happens. But I can only create one VM because of it. It would be interesting to add an extra layer I think (this could allow multi VM in 1 mechfile too maybe?)