miromannino / Contributions-Importer-For-Github

This tool helps users to import contributions to GitHub from private git repositories, or from public repositories that are not hosted in GitHub.
MIT License
357 stars 54 forks source link

No module named 'git_contributions_importer' #46

Open julix-unity opened 3 months ago

julix-unity commented 3 months ago

the import scripts from the tutorials didn't work for me. Specifically the line:

from git_contributions_importer import *  

running python_run.py in root.

it failed as

(Contributions-Importer-For-Github) julix @ 17:42 $ python3 run_script.py               
Traceback (most recent call last):
  File "/Users/julian.sloman/Dev/Contributions-Importer-For-Github/run_script.py", line 5, in <module>
    from git_contributions_importer import *  # Assuming git_contributions_importer is the package name defined in __init__.py
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'git_contributions_importer'

I moved it to src and imported things directly:

import git

from .Content import *
from .Importer import *
from .Committer import *

and then called it as

python -m src.run_script

that worked.

I don't normally do Python as a Front End dev, so figured I'd share the findings in case anyone else runs into these troubles.

AmartyaSingh97 commented 1 month ago

Thanks much needed, was facing the same difficulty !!