bitbucket-issue-migration icon indicating copy to clipboard operation
bitbucket-issue-migration copied to clipboard

No such file or directory: ''

Open SimonDarksideJ opened this issue 2 years ago • 3 comments

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 avatar Apr 23 '22 11:04 SimonDarksideJ

A little more info, not sure if it helps.

  • I tried uninstalling requests using pip and reinstalling it manually - didn't help
  • I tried uninstalling requests using pip3 and reinstalling it manually - didn't help

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

  • If I run the script with just "python .\check-requests-ver.py" - it works and returns the version
  • If I run the script with "python3 .\check-requests-ver.py" - it has the same error, module not found

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 avatar Apr 23 '22 11:04 SimonDarksideJ

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

SimonDarksideJ avatar Apr 23 '22 11:04 SimonDarksideJ

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:

  • What version of python are you using?
  • What OS?
  • What is the full command you are running to execute this, including the options you're passing in... ?

jeffwidman avatar Jun 15 '22 18:06 jeffwidman