_arch.txt includes blank lines which lead to errors

Open Beginner friendly
#49 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
tooling

Research direction

Open src/matlab/init.py and inspect how arch_file is read into the four path variables. Reproduce the case with a MATLAB-generated _arch.txt containing blank lines, then confirm that blank lines are ignored and the paths are parsed without errors.

Written by the indexing model from the issue text.

Description

src/matlab/__init__.py:
with open(arch_file, 'r') as root:
    [arch, bin_folder, engine_folder, extern_bin] = [line.strip() for line in root.readlines()]

blank lines are not ignored in this code which are created by default from MATLAB.
[line.strip() for line in root.readlines() if line.strip()] would fix it.

Dominant language
Python
Stars
97
Forks
13
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mathworks/matlab-engine-for-python

All issues in mathworks/matlab-engine-for-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.