You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm splitting the Go SDK generator into a types generator and a client generator. To do this, I've introduced a go_helpers module. But I'm having trouble using the helper when invoking the stone helper script. Specifically, this does not work:
$ stone -a :all -v "go_client.stoneg.py" "$gen_dir" "$spec_dir"/*.stone
...
error: Importing generator 'go_client.stoneg.py' module raised an exception:
Traceback (most recent call last):
File "/usr/local/bin/stone", line 9, in <module>
load_entry_point('stone==0.1', 'console_scripts', 'stone')()
File "/usr/local/lib/python3.5/site-packages/stone-0.1-py3.5.egg/stone/cli.py", line 303, in main
generator_module = imp.load_source('user_generator', args.generator)
File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/imp.py", line 172, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 693, in _load
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 665, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "go_client.stoneg.py", line 1, in <module>
from go_helpers import HEADER
ImportError: No module named 'go_helpers'
I'm actually not sure what to do here. The root cause is that the python path is different when called via the entry point vs. invoking python directly. The recommendation is for the entire generator to be in a single module when it isn't built-in to stone.
I'm splitting the Go SDK generator into a types generator and a client generator. To do this, I've introduced a
go_helpers
module. But I'm having trouble using the helper when invoking thestone
helper script. Specifically, this does not work:But this does:
The text was updated successfully, but these errors were encountered: