You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
There's a bug in the get_opf_path method of the OpenPechaGitRepo class where the method prematurely returns the OPF path after calling the download_pecha function. This behavior can lead to other functions and properties trying to access a file that is not the correct OPF path, causing potential file not found errors or incorrect file handling.
To Reproduce
Steps to reproduce the behavior:
Initialize an instance of OpenPechaGitRepo with a valid pecha_id and without a path.
The get_opf_path method is invoked during initialization.
The method calls download_pecha(pecha_id)
The method returns a path that is not the correct OPF path.
Expected behavior
The expected behavior is that the get_opf_path method should correctly handle the scenario where a pecha is being downloaded and the correct opf path is returned. It should ensure that the path returned is the correct OPF path after the download is complete.
Screenshots
the code can be changed to this.
Desktop (please complete the following information):
OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]
Additional context
in the following function an OpenPechaGitRepo object is created. here the property opf.base_names_list is showing an error becuase it is misguided to the pecha folder instead of opf folder because premature return of opf path value.
code:
error message:
An error occurred while processing Pecha ID I229815A9: [Errno 2] No such file or directory: '/home/gangagyatso/.openpecha/pechas/I229815A9/base'
The text was updated successfully, but these errors were encountered:
Describe the bug
There's a bug in the get_opf_path method of the OpenPechaGitRepo class where the method prematurely returns the OPF path after calling the download_pecha function. This behavior can lead to other functions and properties trying to access a file that is not the correct OPF path, causing potential file not found errors or incorrect file handling.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The expected behavior is that the get_opf_path method should correctly handle the scenario where a pecha is being downloaded and the correct opf path is returned. It should ensure that the path returned is the correct OPF path after the download is complete.
Screenshots
![Screenshot from 2024-01-08 16-51-14](https://private-user-images.githubusercontent.com/52191545/295122240-678949c7-1d71-43c5-80ee-c68414113f68.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMjQ0MTYsIm5iZiI6MTczOTIyNDExNiwicGF0aCI6Ii81MjE5MTU0NS8yOTUxMjIyNDAtNjc4OTQ5YzctMWQ3MS00M2M1LTgwZWUtYzY4NDE0MTEzZjY4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDIxNDgzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM0YzM4ZWExNDRjOWJiZjY2NjkwYWZiMjA3ODRlYjgwMDEyNjRmNWM3MGQ3MGU0ZDlmNWJiMzUwNTVjYmE5MDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ZZoMBeOcwZO7QhMlDpbyTjGLpkCKU1QDfA9MO-j-Uzk)
the code can be changed to this.
Desktop (please complete the following information):
Additional context
![Screenshot from 2024-01-09 12-29-06](https://private-user-images.githubusercontent.com/52191545/295124767-e6a3603d-dd2a-4fde-baa4-d007b7d13a6c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMjQ0MTYsIm5iZiI6MTczOTIyNDExNiwicGF0aCI6Ii81MjE5MTU0NS8yOTUxMjQ3NjctZTZhMzYwM2QtZGQyYS00ZmRlLWJhYTQtZDAwN2I3ZDEzYTZjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDIxNDgzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIzYjI3YTEyM2YwMDNkNWMzNDZhYmRiNjczY2JjNTA2OGZiOTdkYzkzY2MyZmQ1ZTgyY2FiNjc2NjcwZmE0ZmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.AnKGAnnBTjbQASdgfcG_XbsGI_xvvnWxFJ3CBwlRLcg)
in the following function an OpenPechaGitRepo object is created. here the property opf.base_names_list is showing an error becuase it is misguided to the pecha folder instead of opf folder because premature return of opf path value.
code:
error message:
An error occurred while processing Pecha ID I229815A9: [Errno 2] No such file or directory: '/home/gangagyatso/.openpecha/pechas/I229815A9/base'
The text was updated successfully, but these errors were encountered: