wireviz / WireViz

Easily document cables and wiring harnesses.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Help with OS Error

ElPi23 opened this issue · comments

Hello everyone,
I have received the following error and can't figure out what the problem is.

Error:
ERROR: Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "C:\Users\elias.pircher\AppData\Local\Programs\Python\Python312\Scripts\wireviz.exe\__main__.py", line 7, in File "C:\Users\elias.pircher\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py", line 1157, in __call__ return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\elias.pircher\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py", line 1078, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "C:\Users\elias.pircher\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\elias.pircher\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py", line 783, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\elias.pircher\AppData\Local\Programs\Python\Python312\Lib\site-packages\wireviz\wv_cli.py", line 141, in wireviz wv.parse( File "C:\Users\elias.pircher\AppData\Local\Programs\Python\Python312\Lib\site-packages\wireviz\wireviz.py", line 88, in parse yaml_data, yaml_file = _get_yaml_data_and_path(inp) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\elias.pircher\AppData\Local\Programs\Python\Python312\Lib\site-packages\wireviz\wireviz.py", line 416, in _get_yaml_data_and_path raise e File "C:\Users\elias.pircher\AppData\Local\Programs\Python\Python312\Lib\site-packages\wireviz\wireviz.py", line 406, in _get_yaml_data_and_path yaml_path = Path(inp).expanduser().resolve(strict=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\elias.pircher\AppData\Local\Programs\Python\Python312\Lib\pathlib.py", line 1240, in resolve s = self._flavour.realpath(self, strict=strict) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 730, in realpath OSError: _getfinalpathname: path too long for Windows

The YML file: YMLFILE.txt

I have already uninstalled and reinstalled wireviz without success
i have also tried to save the file to a location with a shorter path without success

Wireviz version: 4.0
Graphviz version 11.0.0 (20240428.1522)
Python 3.12.3

This should be fixed with the next release :

From the README:
Installing the development version
Access to the current state of the development branch can be gained by cloning the repo and installing manually:

git clone https://github.com/wireviz/WireViz
cd WireViz
git checkout release/v0.4.1-rc
pip3 install -e .

(replaced dev with release/v0.4.1-rc}

i have installed the development version and when i use prependet file i still get the same error message.

it seems to have something to do with the length of the content of the .yml file because if i shorten it it works (even if i only delete comments)

I can confirm this bug. The exception is raised with e.errno as None. Thanks for reporting!

if type(e) is OSError and e.errno not in (EINVAL, ENAMETOOLONG):

Fixed in PR #392 by:

if type(e) is OSError and e.errno not in (EINVAL, ENAMETOOLONG, None):
commented

@ElPi23 - Can you confirm that PR #392 solves your issue, or do you still get an error message?

with the vesion wireviz-0.4.1.dev0 it does not work for me
(i hope i did everything right i have never worked with git before)

I have done everything once again as described in the first comment of @martinrieder

@ElPi23 you need to checkout from here:
https://github.com/martinrieder/WireViz/tree/bugfix/issue391
The easiest would be downloading the ZIP file from GH if you don't feel comfortable with using git.
The PR that I created is not yet merged into the version that you got.

Thank you
can confirm that it is now working

many thanks for the fast and awesome support

@ElPi23 I recommend you install the GitHub CLI, which allows to easily checkout PRs like this in the future:

gh pr checkout 392

As I wrote in #392 (comment), I still want to take a closer look at the root cause. Thanks again for reporting and also for confirming the fix!

commented

The relevant fixes are now merged into the release/v0.4.1-rc branch of PR #365 that is not yet released, but also describes how you can install the latest collection of fixes before the release.

commented

Closed after releasing v0.4.1.