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

Pybind with error dictionary changed size during iteration #224

Open
xijq227 opened this issue Sep 6, 2018 · 3 comments
Open

Pybind with error dictionary changed size during iteration #224

xijq227 opened this issue Sep 6, 2018 · 3 comments

Comments

@xijq227
Copy link

xijq227 commented Sep 6, 2018

I'm trying to generate a class of openconfig-interfaces.yang with augment in openconfig-if-ip.yang

nexus@Nexus-XPS MINGW64 ~/Documents/NERA/Starhub/QFX Phase1B/NorthStar Appformix Demo Project
$ python --version
Python 2.7.14
(env)
nexus@Nexus-XPS MINGW64 ~/Documents/NERA/Starhub/QFX Phase1B/NorthStar Appformix Demo Project
$ pyang --version
pyang 1.7.5
(env)
$ pyang --plugindir env/Lib/site-packages/pyangbind/plugin/ -f pybind -o openconfig_interfaces.py -p yang_modules/ yang_modules/oc_models/interfaces/openconfig-interfaces.yang yang_modules/oc_models/interfaces/openconfig-if-ip.yang --lax-quote-checks
Traceback (most recent call last):
  File "C:/Users/nexus/DOCUME~1/NERA/Starhub/QFXPHA~1/NORTHS~1/env/Scripts/pyang", line 450, in <module>
    run()
  File "C:/Users/nexus/DOCUME~1/NERA/Starhub/QFXPHA~1/NORTHS~1/env/Scripts/pyang", line 419, in run
    emit_obj.emit(ctx, modules, fd)
  File "env/Lib/site-packages/pyangbind/plugin/pybind.py", line 222, in emit
    build_pybind(ctx, modules, fd)
  File "env/Lib/site-packages/pyangbind/plugin/pybind.py", line 406, in build_pybind
    build_identities(ctx, defn['identity'])
  File "env/Lib/site-packages/pyangbind/plugin/pybind.py", line 446, in build_identities
    idstore.build_store_from_definitions(ctx, defnd)
  File "C:\users\nexus\docume~1\nera\starhub\qfxpha~1\norths~1\env\lib\site-packages\pyangbind\helpers\identity.py", line 75, in build_store_from_definitions
    mod_ref_prefixes = module_import_prefixes(ctx)
  File "C:\users\nexus\docume~1\nera\starhub\qfxpha~1\norths~1\env\lib\site-packages\pyangbind\helpers\misc.py", line 24, in module_import_prefixes
    for mod in ctx.modules:
RuntimeError: dictionary changed size during iteration
@RAMCCNA
Copy link

RAMCCNA commented Dec 10, 2018

Good Day,
I too have the similar issue when attempting to create a binding.py

Administrator@WIN-9FK6N12 MINGW64 /pythonvenv
$ py -V
Python 2.7.15
(PY2-YA1)
Administrator@WIN-9FK6N12 MINGW64 /pythonvenv
$ pyang --version
pyang 1.7.5
(PY2-YA
1)
Administrator@WIN-9FK6N12 MINGW64 /pythonvenv
$ pyang --plugindir $PYBINDPLUGIN -f pybind -o ietf_ip_binding.py ietf-ip.yang ietf-interfaces.yang ietf-inet-types.yang ietf-yang-types.yang
Traceback (most recent call last):
File "C:/PROGRA1/Git/PYTHON1/PY2-YA1/Scripts/pyang", line 450, in
run()
File "C:/PROGRA
1/Git/PYTHON1/PY2-YA1/Scripts/pyang", line 419, in run
emit_obj.emit(ctx, modules, fd)
File "C:\PROGRA1\Git\PYTHON1\PY2-YA1\lib\site-packages\pyangbind/plugin\pybind.py", line 222, in emit
build_pybind(ctx, modules, fd)
File "C:\PROGRA
1\Git\PYTHON1\PY2-YA1\lib\site-packages\pyangbind/plugin\pybind.py", line 406, in build_pybind
build_identities(ctx, defn['identity'])
File "C:\PROGRA1\Git\PYTHON1\PY2-YA1\lib\site-packages\pyangbind/plugin\pybind.py", line 446, in build_identities
idstore.build_store_from_definitions(ctx, defnd)
File "C:\progra
1\git\python1\py2-ya1\lib\site-packages\pyangbind\helpers\identity.py", line 75,in build_store_from_definitions
mod_ref_prefixes = module_import_prefixes(ctx)
File "C:\progra1\git\python1\py2-ya~1\lib\site-packages\pyangbind\helpers\misc.py", line 24, in module_import_prefixes
for mod in ctx.modules:
RuntimeError: dictionary changed size during iteration

Anyone have any input on what the issue may be?
Thanks

@Lancerzzzz
Copy link

i have same issue?why?????

@JoseIgnacioTamayo
Copy link
Collaborator

Could you please try again with a recent / latest version of pyangbind?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants