jeffwidman / bitbucket-issue-migration

A small script for migrating repo issues from Bitbucket to GitHub
GNU General Public License v3.0
313 stars 97 forks source link

No such file or directory: '' #138

Open SimonDarksideJ opened 2 years ago

SimonDarksideJ commented 2 years ago

I followed the install instructions on the Repository on Windows, yet when I run the migrate script is still says:

ModuleNotFoundError: No module named 'requests'

I ran "pip3 install -r requirements.pip" again and it certainly seems to think it's installed

(py3) C:\LocalDevelopment\Scratch\bitbucket-issue-migration>pip3 install -r requirements.pip
Requirement already satisfied: requests>=2.4.2 in c:\localdevelopment\scratch\bitbucket-issue-migration\py3\lib\site-packages (from -r requirements.pip (line 1)) (2.27.1)
Requirement already satisfied: certifi>=2017.4.17 in c:\localdevelopment\scratch\bitbucket-issue-migration\py3\lib\site-packages (from requests>=2.4.2->-r requirements.pip (line 1)) (2021.10.8)
Requirement already satisfied: idna<4,>=2.5 in c:\localdevelopment\scratch\bitbucket-issue-migration\py3\lib\site-packages (from requests>=2.4.2->-r requirements.pip (line 1)) (3.3)
Requirement already satisfied: charset-normalizer~=2.0.0 in c:\localdevelopment\scratch\bitbucket-issue-migration\py3\lib\site-packages (from requests>=2.4.2->-r requirements.pip (line 1)) (2.0.12)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\localdevelopment\scratch\bitbucket-issue-migration\py3\lib\site-packages (from requests>=2.4.2->-r requirements.pip (line 1)) (1.26.9)

Any ideas?

SimonDarksideJ commented 2 years ago

A little more info, not sure if it helps.

However, if I run a test script to just import the Requests module,

I did try running the migrate.py with just "python" but it filed with the following error:

Traceback (most recent call last):
  File "C:\LocalDevelopment\Scratch\bitbucket-issue-migration\migrate.py", line 897, in <module>
    sys.exit(main(options))
  File "C:\LocalDevelopment\Scratch\bitbucket-issue-migration\migrate.py", line 142, in main
    users_bb_gh_mapping = [line.rstrip() for line in open(''.join(options._map_users), "r")]
FileNotFoundError: [Errno 2] No such file or directory: ''
SimonDarksideJ commented 2 years ago

OK, last update, I think I fixed Requests not being accessible from the Python3 command by using:

python3 -m pip install requests

Running my requests version check script then works from Python3

However, now running the migrate script under Python3 still results in the above error :S

jeffwidman commented 2 years ago

So this line is bombing out: https://github.com/jeffwidman/bitbucket-issue-migration/blob/ead99475e70d55a7cd9157ecb44ba1962ad5fa16/migrate.py#L142

That leverages a passed-in option to specify a mappings file, but the intent was that file should be optional...

I'm unlikely to have the time to fix this, but I'd happily accept a PR if someone else wants to fix it, so the following information would be helpful: