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

MarkDownFile not accepting absolute file path anymore #81

Closed
KarstenSchaeffer opened this issue Feb 16, 2023 · 2 comments
Closed

MarkDownFile not accepting absolute file path anymore #81

KarstenSchaeffer opened this issue Feb 16, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@KarstenSchaeffer
Copy link

KarstenSchaeffer commented Feb 16, 2023

Describe the bug
With "Modify tests to fix flakiness" MarkDownFile.init() has been modified to use os.getcwd() as base directory.
This makes it impossible to specify an absolute path via MdUtils.create_md_file().

To Reproduce

md_file = mdutils.MdUtils(file_name="<absolute file path>", title="My title")
md_file.create_md_file()

leads to

FileNotFoundError: [Errno 2] No such file or directory: '<current directory>/<absolute file path>'

Expected behavior
MD file is created with given absolute file_name.

Desktop (please complete the following information):

  • OS: Ubuntu
  • Version 22.04
@KarstenSchaeffer KarstenSchaeffer added the bug Something isn't working label Feb 16, 2023
@didix21
Copy link
Owner

didix21 commented Feb 16, 2023

Thanks for reporting the issue I'll check for the problem, I recommend to downgrade to 1.4.0 version.

@lauritsriple
Copy link

I got the same issue. Downgrading to 1.4.0 solves this temporarily.

didix21 added a commit that referenced this issue Mar 9, 2023
didix21 added a commit that referenced this issue Mar 10, 2023
didix21 added a commit that referenced this issue Mar 11, 2023
- Add new test for improving coverage.
- Install pytest on github actions.
- Replace unittest for pytest on github actions.
didix21 added a commit that referenced this issue Mar 11, 2023
- Add new test for improving coverage.
- Install pytest on github actions.
- Replace unittest for pytest on github actions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants