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
When I try to run the hello_gtk example on its own, I get:
# From Hancho’s root directory
$ python hancho.py -f hello_gtk.hancho -C examples/hello_gtk
Loading module /build/hancho/src/hancho-0.2.0/examples/hello_gtk/hello_gtk.hancho
Loading module /build/hancho/src/hancho-0.2.0/examples/hello_gtk/rules.hancho
Traceback (most recent call last):
File "/build/hancho/src/hancho-0.2.0/hancho.py", line 1530, in<module>sys.exit(app.main())
^^^^^^^^^^
File "/build/hancho/src/hancho-0.2.0/hancho.py", line 1238, in main
self.load_hanchos()
File "/build/hancho/src/hancho-0.2.0/hancho.py", line 1318, in load_hanchos
self.load_module(
File "/build/hancho/src/hancho-0.2.0/hancho.py", line 1470, in load_module
types.FunctionType(code, module.__dict__)()
File "hello_gtk.hancho", line 3, in<module>
File "/build/hancho/src/hancho-0.2.0/hancho.py", line 395, in load
return load_file(file_name, as_repo=False, args=args, kwargs=kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/build/hancho/src/hancho-0.2.0/hancho.py", line 392, in load_file
return app.load_module(repo_path, repo_name, file_path, file_name, mod_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/build/hancho/src/hancho-0.2.0/hancho.py", line 1439, in load_module
with open(file_pathname, encoding="utf-8") as file:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/build/hancho/src/hancho-0.2.0/examples/hello_gtk/rules.hancho'
The hello_gtk example clearly tries to get rules.hancho from the project root, but repo_path seems to be ./examples/hello_gtk, so the load command fails.
Surprisingly, the debug output actually says that repo_path is the project root:
Hancho even allows me to control repo_path by passing --repo_path=…, which clearly affects the global config (according to the debug output). But Hancho still resolves {repo_path}/rules.hancho to examples/hello_gtk/rules.hancho.
You caught me in the middle of merging v0.2 into main and adding some tweaks from other forks I'd made. I'm going through the examples and stuff now trying to fix everything, just give me a day or so. :D
When I try to run the
hello_gtk
example on its own, I get:The
hello_gtk
example clearly tries to getrules.hancho
from the project root, butrepo_path
seems to be./examples/hello_gtk
, so theload
command fails.Surprisingly, the debug output actually says that
repo_path
is the project root:Shouldn’t the debug output be consistent to the value to which Hancho actually evaluates the property?
What would be a correct command line to run the
hello_gtk
example directly?I’ve tried several combinations but none worked.
The text was updated successfully, but these errors were encountered: