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

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

Open
matiasjosecastro opened this issue Nov 26, 2020 · 2 comments
Open

Comments

@matiasjosecastro
Copy link

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
Copy link
Author

matiasjosecastro commented Nov 26, 2020

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]]

@dtracers
Copy link
Member

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)

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