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

KeyError: token name from DSL #1

Open
Ala-Alsanea opened this issue Sep 13, 2022 · 2 comments
Open

KeyError: token name from DSL #1

Ala-Alsanea opened this issue Sep 13, 2022 · 2 comments

Comments

@Ala-Alsanea
Copy link

i run the code with python Main.py -n 10 in fedora 36 and and i got

Traceback (most recent call last):
  File "/home/ala/Desktop/sketched-webpages-generator/Main.py", line 223, in <module>
    generateDataset(KEEP_INTERMEDIATE_OUTPUTS=args.intermediate,
  File "/home/ala/Desktop/sketched-webpages-generator/Main.py", line 155, in generateDataset
    compileDSL(GENERATOR_OUTPUT_PATH + fileName + '_0.dsl')
  File "/home/ala/Desktop/sketched-webpages-generator/Compiler/WebCompiler.py", line 51, in compileDSL
    compiler.compile(input_file_path, output_file_path, rendering_function=render_content_with_text)
  File "/home/ala/Desktop/sketched-webpages-generator/Compiler/classes/Compiler.py", line 46, in compile
    output_html += self.root.render(self.dsl_mapping, rendering_function=rendering_function)
  File "/home/ala/Desktop/sketched-webpages-generator/Compiler/classes/Node.py", line 34, in render
    content += child.render(mapping, rendering_function)
  File "/home/ala/Desktop/sketched-webpages-generator/Compiler/classes/Node.py", line 36, in render
    value = mapping[self.key]
KeyError: 'navba'

and i also made change in Render.py
self.driver = webdriver.PhantomJS()
to
self.driver = webdriver.Chrome()

so what is the problem ??

@Dev-Tarek
Copy link
Owner

sorry I haven't been working on this project for a while.
have you been able to solve this yet? I can see you have a key error "navba" which probably meant to be "navbar", ensure it's correct in the mapping and DSL files

@Ala-Alsanea
Copy link
Author

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

2 participants