mirror of
https://github.com/patrickchugh/terravision.git
synced 2026-05-09 08:25:25 +02:00
[GH-ISSUE #62] Unhandled error: <class 'FileExistsError'>, [Errno 17] File exists #30
Labels
No labels
bug
enhancement
enhancement
good first issue
good first issue
good first issue
pipeline
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/terravision#30
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @DavideExp on GitHub (Oct 6, 2023).
Original GitHub issue: https://github.com/patrickchugh/terravision/issues/62
Hello,
I'm new to Terravision.
From a RHEL8 container, I'm trying to run
terravision drawon both a local repo and one in Bitbucket but I keep getting the following error:Downloading External Module: git::https://xxx/scm/yyy/module Cloning from Terraform registry source: https://xxx/scm/yyy/module Skipping download of module git__https_//xxx/scm/yyy/module, found existing folder in module cache Unhandled error: <class 'FileExistsError'>, [Errno 17] File exists: '/tmp/tmpm0n6kthk/;module_name;git__https_//xxx/scm/yyy/module', <traceback object at 0x7fc1567b8900>I can't see the folder in
/tmp. I tried to delete the module from terravision cache but the same happened again.That module is called by other modules in the code.
Any suggestions?
Thanks
@dhurdpepper commented on GitHub (Oct 6, 2023):
Just ran into this myself. Was able to hack together a solution by running with the
--debugflag, finding the file that threw the FileExistsError exception, catching it, and setting the appropriate variable to thefilenameproperty on the exception.e.g.
@patrickchugh commented on GitHub (Oct 7, 2023):
I am presently rewriting the code to use terraform's own module cache instead of cloning the source separately so this issue should hopefully go away
@patrickchugh commented on GitHub (Oct 7, 2023):
I will be releasing a new version that doesn't clone modules and uses the terraform cache so this problem will hopefully be resolved soonSent from Outlook for AndroidFrom: Devin Hurd @.>Sent: Friday, October 6, 2023 8:49:51 pmTo: patrickchugh/terravision @.>Cc: Subscribed @.***>Subject: Re: [patrickchugh/terravision] Unhandled error: <class 'FileExistsError'>, [Errno 17] File exists (Issue #62)
Just ran into this myself. Was able to hack together a solution by running with the --debug flag, finding the file that threw the FileExistsError exception, catching it, and setting the appropriate variable to the filename property on the exception.
e.g.
// modules/fileparser.py
try:
modfolder = gitlibs.clone_files(sourceURL, temp_modules_dir, k)
except Exception as e:
modfolder = e.filename
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>
@patrickchugh commented on GitHub (Nov 21, 2023):
@DavideExp @dhurdpepper Hello, thank you for your feedback and thanks for testing out Terravision and helping to make this a better product. I have recently completed a major revamp to the code which uses the terraform binary to download source files and generate initial relationships, before augmenting it with source code parsing as before. This is a significant departure from the previous approach and whilst slower, ensures a more accurate output and will handle all terraform in built functions now when encountered in the source. Please do a git pull and re-test again with the latest source code. If your problem is resolved, please close the the thread in github issues and mark it as completed. If not, please give as much detail as you can about the errors and include any source files if possible so I can reproduce your issue. Once again, thanks for helping and look forward to hearing from you soon.
P.
@patrickchugh commented on GitHub (Nov 29, 2023):
can we close this issue now?
@dhurdpepper commented on GitHub (Nov 29, 2023):
@patrickchugh I'm not planning on retesting this any time soon, so fine by me.