Skip to content

MarkDownFile not accepting absolute file path anymore #81

@KarstenSchaeffer

Description

@KarstenSchaeffer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions