Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c6a0419

Browse files
committed
fix code gen path to plot-schema
1 parent 066f34b commit c6a0419

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

plotly-package/codegen/__init__.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def perform_codegen():
8383
# ---------------------------------
8484
# (relative to project root)
8585
abs_file_path = opath.realpath(__file__)
86-
project_root = opath.dirname(opath.dirname(opath.dirname(abs_file_path)));
86+
project_root = opath.dirname(opath.dirname(opath.dirname(abs_file_path)))
8787

8888
outdir = opath.join(project_root, 'plotly-package', 'plotly')
8989

@@ -106,7 +106,15 @@ def perform_codegen():
106106

107107
# Load plotly schema
108108
# ------------------
109-
with open('plotly-package/codegen/resources/plot-schema.json', 'r') as f:
109+
plot_schema_path = opath.join(
110+
project_root,
111+
'plotly-package',
112+
'codegen',
113+
'resources',
114+
'plot-schema.json',
115+
)
116+
117+
with open(plot_schema_path, 'r') as f:
110118
plotly_schema = json.load(f)
111119

112120
# Preprocess Schema

0 commit comments

Comments
 (0)