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

Fix No such file or directory: '' error #139

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

katsusuke
Copy link

#138

I also encountered the same issue.

My current computer is following envrionment.
Machine: M1 Macbook Air
OS: macOS Monterey 12.6
Python: 3.10.6

$ python migrate.py -bu katsusuke "my-organization/my-repo" "my-organization/myrepo" katsusuke
Traceback (most recent call last):
  File "/Users/katsusuke/git/github.com/jeffwidman/bitbucket-issue-migration/migrate.py", line 897, in <module>
    sys.exit(main(options))
  File "/Users/katsusuke/git/github.com/jeffwidman/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: ''
python --version
Python 3.10.6

I think open('') throws FileNotFoundError.

$ python
Python 3.10.6 (main, Aug 24 2022, 13:55:36) [Clang 13.1.6 (clang-1316.0.21.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> open("")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
FileNotFoundError: [Errno 2] No such file or directory: ''

I tried it on Linux, but open function have the same behavior.

$ uname -a
uname -a
Linux ip-10-0-10-74 5.13.0-1022-aws #24~20.04.1-Ubuntu SMP Thu Apr 7 22:10:15 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"
$ python3
Python 3.8.10 (default, Mar 15 2022, 12:22:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> open('')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
FileNotFoundError: [Errno 2] No such file or directory: ''

@katsusuke katsusuke changed the title fix No such file or directory: '' error Fix No such file or directory: '' error Sep 23, 2022
@OlJohnny
Copy link

OlJohnny commented Sep 18, 2024

^ bump
The mentioned issue is still a problem ...
I can confirm the fix works.

@damienmckenna
Copy link

Can confirm this resolved the issue, thank you katsusuke!

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

Successfully merging this pull request may close these issues.

3 participants