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

Help with OS Error #391

Closed
ElPi23 opened this issue Jun 19, 2024 · 10 comments · Fixed by #392
Closed

Help with OS Error #391

ElPi23 opened this issue Jun 19, 2024 · 10 comments · Fixed by #392
Labels
bug Something isn't working

Comments

@ElPi23
Copy link

ElPi23 commented Jun 19, 2024

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

@martinrieder
Copy link
Contributor

martinrieder commented Jun 20, 2024

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}

@ElPi23
Copy link
Author

ElPi23 commented Jun 20, 2024

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)

@martinrieder
Copy link
Contributor

martinrieder commented Jun 20, 2024

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):

@kvid
Copy link
Collaborator

kvid commented Jun 20, 2024

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

@ElPi23
Copy link
Author

ElPi23 commented Jun 21, 2024

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

@martinrieder
Copy link
Contributor

martinrieder commented Jun 21, 2024

@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.

@ElPi23
Copy link
Author

ElPi23 commented Jun 21, 2024

Thank you
can confirm that it is now working

many thanks for the fast and awesome support

@martinrieder
Copy link
Contributor

martinrieder commented Jun 21, 2024

@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!

@kvid kvid added the bug Something isn't working label Jun 22, 2024
@kvid kvid linked a pull request Jun 22, 2024 that will close this issue
martinrieder added a commit to martinrieder/WireViz that referenced this issue Jul 1, 2024
kvid pushed a commit that referenced this issue Jul 4, 2024
kvid pushed a commit that referenced this issue Jul 4, 2024
@kvid
Copy link
Collaborator

kvid commented Jul 6, 2024

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.

@kvid
Copy link
Collaborator

kvid commented Jul 13, 2024

Closed after releasing v0.4.1.

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