can not load a julia module inside a julia module
- Dominant language
- Python
- Stars
- 893
- Forks
- 101
- PR merge metrics
- No merged PRs in 30d
Description
I'm not sure what is causing this, but when I try (after install Yao#master and PyCall)
```jl
from julia.Yao import *
```
it gives me
```python
~/miniconda3/lib/python3.7/site-packages/julia/core.py in __getattr__(self, name)
167 def __getattr__(self, name):
168 try:
--> 169 return self.__try_getattr(name)
170 except AttributeError:
171 if name.endswith("_b"):
~/miniconda3/lib/python3.7/site-packages/julia/core.py in __try_getattr(self, name)
182 if self._julia.isamodule(jl_fullname):
183 realname = self._julia.fullname(self._julia.eval(jl_fullname))
--> 184 if self._julia.isdefined(realname):
185 return self.__loader__.load_module("julia." + realname)
186 # Otherwise, it may be, e.g., "Main.anonymous", created by
~/miniconda3/lib/python3.7/site-packages/julia/core.py in isdefined(self, fullname)
641
642 if isinstance(parent, string_types):
--> 643 parent = self.eval(parent)
644 return isdefinedstr(parent, member)
645
~/miniconda3/lib/python3.7/site-packages/julia/core.py in eval(self, src)
595 if src is None:
596 return None
--> 597 ans = self._call(src)
598 if not ans:
599 return None
~/miniconda3/lib/python3.7/site-packages/julia/core.py in _call(self, src)
528 # logger.debug("_call(%s)", src)
529 ans = self.api.jl_eval_string(src.encode('utf-8'))
--> 530 self.check_exception(src)
531
532 return ans
~/miniconda3/lib/python3.7/site-packages/julia/core.py in check_exception(self, src)
578 exception = sprint(showerror, self._as_pyobj(res))
579 raise JuliaError(u'Exception \'{}\' occurred while calling julia code:\n{}'
--> 580 .format(exception, src))
581
582 def _typeof_julia_exception_in_transit(self):
JuliaError: Exception 'UndefVarError: YaoBase not defined' occurred while calling julia code:
```
any idea how to fix?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.