carball icon indicating copy to clipboard operation
carball copied to clipboard

ModuleNotFoundError: No module named 'carball.generated.api'

Open matiasjosecastro opened this issue 4 years ago • 2 comments

Hello,

Thanks for taking the time to build this great tool. When attempting to install on windows I get errors regarding boxcars-py. I then downloaded v.0.6.10 and when I attempt to run the py init.py, I get the following error:

traceback (most recent call last): File ".\init.py", line 17, in Initialize_project() File ".\init.py", line 12, in initialize_project create_proto_files() File "C:\Users<User>\Projects\carball-0.6.10\utils\create_proto.py", line 77, in create_proto_files file_list = get_file_list(top_level_dir='api', file_extension='.proto') File "C:\Users<User>\Projects\carball-0.6.10\utils\create_proto.py", line 63, in get_file_list deepness = get_deepness(top_level_dir, path_list) File "C:\Users<User>\Projects\carball-0.6.10\utils\create_proto.py", line 50, in get_deepness return len(path_list) - path_list.index(top_level_dir) ValueError: 'api' is not in list

A similar error occurs on Windows subsytem.

pip install worked on linux machine (Ubuntu 20.04)

matiasjosecastro avatar Nov 26 '20 00:11 matiasjosecastro

Making this switch got it working for me on windows, in utils/create_proto.py old line: proto_dir = [x[0] for x in os.walk(current_dir) if top_level_dir in x[0] and 'pycache' not in x[0]] new line: proto_dir = [x[0] for x in os.walk(os.getcwd()) if top_level_dir in x[0] and 'pycache' not in x[0]]

matiasjosecastro avatar Nov 26 '20 08:11 matiasjosecastro

oh just saw this! It would be awesome if you could create a pull request with that change (just to make sure it works in other OS as well)

dtracers avatar Nov 27 '20 00:11 dtracers