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

FileExistsError: [Errno 17] File exists: '/tmp/tmpvett9j9p' #10

Closed
ghost opened this issue May 11, 2023 · 7 comments
Closed

FileExistsError: [Errno 17] File exists: '/tmp/tmpvett9j9p' #10

ghost opened this issue May 11, 2023 · 7 comments

Comments

@ghost
Copy link

ghost commented May 11, 2023

OS: Fedora Linux 38

Command:

python src/main.py --api-key 12345 --output docs/README.md --local /home/pc/dev/project

Error:

2023-05-11 11:23:13 | INFO | logger:info:32 - README-AI is now executing.
2023-05-11 11:23:13 | INFO | logger:info:32 - Using local directory: /home/pc/dev/project
Traceback (most recent call last):

  File "/home/pc/README-AI/src/main.py", line 133, in <module>
    app()

  File "/home/pc/README-AI/src/main.py", line 32, in main
    asyncio.run(generate_readme(api_key, local, output, remote))

  File "/home/pc/.conda/envs/readmeai/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)

  File "/home/pc/.conda/envs/readmeai/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()

  File "/home/pc/README-AI/src/main.py", line 51, in generate_readme
    dependencies = preprocess.get_project_dependencies(repo, file_exts, file_names)

  File "/home/pc/README-AI/src/preprocess.py", line 201, in get_project_dependencies
    _clone_or_copy_repository(repo, temp_dir)

  File "/home/pc/README-AI/src/preprocess.py", line 46, in _clone_or_copy_repository
    shutil.copytree(repo, temp_dir)

  File "/home/pc/.conda/envs/readmeai/lib/python3.10/shutil.py", line 559, in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,

  File "/home/pc/.conda/envs/readmeai/lib/python3.10/shutil.py", line 457, in _copytree
    os.makedirs(dst, exist_ok=dirs_exist_ok)

  File "/home/pc/.conda/envs/readmeai/lib/python3.10/os.py", line 225, in makedirs
    mkdir(name, mode)

FileExistsError: [Errno 17] File exists: '/tmp/tmpvett9j9p'
@eli64s
Copy link
Owner

eli64s commented May 11, 2023

@jonnydefijn Was this error message on your first try, or did you previously run the command successfully using the local directory?

@ghost
Copy link
Author

ghost commented May 11, 2023

@jonnydefijn Was this error message on your first try, or did you previously run the command successfully using the local directory?

First try.

@mijhaels
Copy link

Same

@eli64s
Copy link
Owner

eli64s commented May 11, 2023

@jonnydefijn @Andythem23 Thanks for the info and testing out the tool!

I've reproduced the error with a local directory and will work on correcting this issue.

If you have the repository on GitHub, please try the remote option for now as that should work.

Thanks!

@eli64s
Copy link
Owner

eli64s commented May 12, 2023

@jonnydefijn @Andythem23 I have updated the code to fix the FileExistsError.

Can you clone the updates and let me know if that solves the issue for you? Thanks!

@jonnyhoff
Copy link

Not getting the File Exists error anymore.

Now getting :

RateLimitError: The server had an error while processing your request. Sorry about that!

@eli64s
Copy link
Owner

eli64s commented Jun 20, 2023

Hey @jonnyhoff ,

Just pushed some updates for API errors. It should properly handle everything now. Let me know if you have anymore issues!

@eli64s eli64s closed this as completed Jun 28, 2023
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 a pull request may close this issue.

3 participants