Giter Site home page Giter Site logo

nest's People

Contributors

zhouyanzhao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nest's Issues

RuntimeError: Unable to load global settings of Nest. load() missing 1 required positional argument: 'Loader'

Hi, I just downloaded the Nest and S3N and try to get it run. When importing the nest module, an error shown as title occurs. Any idea can solve this problem? Many thanks!

Input:
from nest import register

Output:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/nest/settings.py", line 126, in
settings = SettingManager()
File "/usr/local/lib/python3.6/dist-packages/nest/settings.py", line 107, in init
self.load()
File "/usr/local/lib/python3.6/dist-packages/nest/settings.py", line 119, in load
self.settings, self.user_settings = SettingManager.load_settings()
File "/usr/local/lib/python3.6/dist-packages/nest/settings.py", line 93, in load_settings
settings = yaml.load(DEFAULT_SETTINGS)
TypeError: load() missing 1 required positional argument: 'Loader'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.6/dist-packages/nest/init.py", line 1, in
from nest.parser import run_tasks
File "/usr/local/lib/python3.6/dist-packages/nest/parser.py", line 7, in
import nest.utils as U
File "/usr/local/lib/python3.6/dist-packages/nest/utils.py", line 12, in
from nest.logger import exception
File "/usr/local/lib/python3.6/dist-packages/nest/logger.py", line 7, in
from nest.settings import settings
File "/usr/local/lib/python3.6/dist-packages/nest/settings.py", line 128, in
raise RuntimeError('Unable to load global settings of Nest. %s' % exc_info)
RuntimeError: Unable to load global settings of Nest. load() missing 1 required positional argument: 'Loader'

Platform: Ubuntu 20.04
Python 3.6

CLI module list error

Originally reported by @doudoubilly.

Execute " nest module list --filter prm" and get the following result.(Ubuntu16)

(pt-py3) root@ebe535e9a1a8:~# nest module list --filter prm
Traceback (most recent call last):
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/modules.py", line 346, in _import_nest_modules_from_file
spec.loader.exec_module(py_module)
File "", line 665, in exec_module
File "", line 222, in _call_with_frames_removed
File "/root/PRM/install/prm.py", line 30, in
filter_type: Union[str, int, float] = 'median') -> nn.Module:
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/modules.py", line 262, in _register
return create_module(args[0])
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/modules.py", line 259, in create_module
return type('NestModule', (NestModule,), dict(slots=(), doc=doc))(func, nest_meta)
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/modules.py", line 69, in init
self._check_definition()
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/modules.py", line 80, in _check_definition
if v.default is not inspect.Parameter.empty and not U.is_annotation_matched(v.default, v.annotation):
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/logger.py", line 59, in wrapper
res = func(*args, **kwargs)
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/utils.py", line 236, in is_annotation_matched
sub_annotation = annotation.args
AttributeError: type object 'Union' has no attribute 'args'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/Envs/pt-py3/bin/nest", line 11, in
sys.exit(main())
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/main.py", line 4, in main
CLI()
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/cli.py", line 71, in init
getattr(self, 'cmd_' + args.command)('nest ' + args.command, sys.argv[2:])
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/cli.py", line 162, in cmd_module
module_info = ['%s (%s)' % (k, v.meta.get('version', 'version')) for k, v in module_manager]
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/modules.py", line 702, in iter
self._update_modules()
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/modules.py", line 692, in _update_modules
ModuleManager._import_nest_modules_from_dir(meta['module_path'], namespace, self.py_modules, self.nest_modules, meta)
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/modules.py", line 407, in _import_nest_modules_from_dir
ModuleManager._import_nest_modules_from_file(file_path, namespace, py_modules, nest_modules, meta)
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/modules.py", line 356, in _import_nest_modules_from_file
if (type(exc_info) is ModuleNotFoundError or type(exc_info) is ImportError) and exc_info.name is not None:
NameError: name 'ModuleNotFoundError' is not defined

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.