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

No such file or directory: '' #138

Open
SimonDarksideJ opened this issue Apr 23, 2022 · 3 comments
Open

No such file or directory: '' #138

SimonDarksideJ opened this issue Apr 23, 2022 · 3 comments

Comments

@SimonDarksideJ
Copy link

SimonDarksideJ commented Apr 23, 2022

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

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

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 SimonDarksideJ changed the title Ran install commands, still says missing "requests" After getting "requests" working, get error "No such file or directory:" Apr 23, 2022
@jeffwidman jeffwidman changed the title After getting "requests" working, get error "No such file or directory:" No such file or directory: '' Jun 15, 2022
@jeffwidman
Copy link
Owner

So this line is bombing out:

users_bb_gh_mapping = [line.rstrip() for line in open(''.join(options._map_users), "r")]

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... ?

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