Closed 8bitDesigner closed 1 year ago
I'm not a Python expert, but I think this is because the YSContext
class is being inited with a YSYangSet
instead of a string, which would explain why the error message is printing out "No such file or directory: '{YSYangSet string representation}'"
. If I replace the YSYangSet
's string representation method with yangset_path(self.owner, self.setname)
(eg: print its path instead of a description), this seems to work
I'm not a Python expert, but I think this is because the
YSContext
class is being inited with aYSYangSet
instead of a string, which would explain why the error message is printing out"No such file or directory: '{YSYangSet string representation}'"
. If I replace theYSYangSet
's string representation method withyangset_path(self.owner, self.setname)
(eg: print its path instead of a description), this seems to work
i'm having the same issue. can you give more detail on what files and lines you changed to work around this?
In my case it was yangsuitevenv/lib/python3.8/site-packages/ysfilemanager/filemanager/yangset.py
where yangsuitevenv
is the name of the virtualenv I set up to install YangSuite into
We have a bug open on this, the engineer was able to reproduce it, and we should have a fix soon.
Hi,
I'm having a similiar issue. Yang repos and module sets can be configured, but trying to open any model for exploration in the Explore -> YANG tab errors out with Error 500: 'YSContext' object has no attribute 'repository'
The server logs:
[31/Mar/2023 13:41:24] ERROR [django.request:222] 'YSContext' object has no attribute 'repository': /yangtree/gettree/ [31/Mar/2023 13:41:24] ERROR [django.server:154] "POST /yangtree/gettree/ HTTP/1.1" 500 2 Process Process-7: Traceback (most recent call last): File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/home/ubuntu/testing/yangsuite/.venv/lib/python3.8/site-packages/ysyangtree/yangsettree.py", line 312, in create_tree_process ctx = YSContext.get_instance(ref, merge_user_set( File "/home/ubuntu/testing/yangsuite/.venv/lib/python3.8/site-packages/ysyangtree/context.py", line 148, in get_instance repo = ctx.repository AttributeError: 'YSContext' object has no attribute 'repository' [31/Mar/2023 13:41:42] ERROR [django.request:222] 'YSContext' object has no attribute 'repository': /yangtree/gettree/ [31/Mar/2023 13:41:42] ERROR [django.server:154] "POST /yangtree/gettree/ HTTP/1.1" 500 2 Process Process-8: Traceback (most recent call last): File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/home/ubuntu/testing/yangsuite/.venv/lib/python3.8/site-packages/ysyangtree/yangsettree.py", line 312, in create_tree_process ctx = YSContext.get_instance(ref, merge_user_set( File "/home/ubuntu/testing/yangsuite/.venv/lib/python3.8/site-packages/ysyangtree/context.py", line 148, in get_instance repo = ctx.repository AttributeError: 'YSContext' object has no attribute 'repository' [31/Mar/2023 13:43:38] ERROR [django.request:222] 'YSContext' object has no attribute 'repository': /yangtree/gettree/ [31/Mar/2023 13:43:38] ERROR [django.server:154] "POST /yangtree/gettree/ HTTP/1.1" 500 2
A fix for this has been deployed to yangsuite-yangtree as a pre-release. Pre-releases can be manually installed or you can wait for yangsuite-yangtree 2.1.3 main release (probably sometime next week).
** NOTE: your directory or container name may vary depending on your install
source yangsuite/venv/bin/activate
pip install --upgrade --pre yangsuite-yangtree
For docker containers first enter the container using the exec command.
docker exec -it yangsuite bash
pip install --upgrade --pre yangsuite-yangtree
Should have yangsuite-yangtree 2.1.3.post0.dev3 showing in Admin-->Manage plugins
Hi all, I just checked out this project this morning, and I'm receiving the following error when trying to explore a yangset I have set up:
And the stack trace from the console:
Steps to reproduce
Versions