I'm following along with this video:
https://www.youtube.com/watch?v=y8Thrrw25rQ&list=PLmnzWPUjpmaGzFNq2PeMljHNrXGwj2TDY&index=1
trying to set up my dev environment for chialisp.
Installed python, created virtual environment, ran pip install chia-dev-tools (got this working after installing c++ buildtools). All looks to work fine but when i run the chia --help command I'm getting errors
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\chialisp\chiatest1\venv\Scripts\chia.exe_main.py", line 4, in
File "C:\chialisp\chiatest1\venv\Lib\site-packages\chia\cmds\chia.py", line 18, in
from chia.cmds.peer import peer_cmd
File "C:\chialisp\chiatest1\venv\Lib\site-packages\chia\cmds\peer.py", line 7, in
from chia.cmds.cmds_util import NODE_TYPES
File "C:\chialisp\chiatest1\venv\Lib\site-packages\chia\cmds\cmds_util.py", line 17, in
from chia.rpc.wallet_rpc_client import WalletRpcClient
File "C:\chialisp\chiatest1\venv\Lib\site-packages\chia\rpc\wallet_rpc_client.py", line 3, in
from chia.data_layer.data_layer_wallet import Mirror, SingletonRecord
File "C:\chialisp\chiatest1\venv\Lib\site-packages\chia\data_layer\data_layer_wallet.py", line 42, in
from chia.wallet.outer_puzzles import AssetType
File "C:\chialisp\chiatest1\venv\Lib\site-packages\chia\wallet\outer_puzzles.py", line 8, in
from chia.wallet.cat_wallet.cat_outer_puzzle import CATOuterPuzzle
File "C:\chialisp\chiatest1\venv\Lib\site-packages\chia\wallet\cat_wallet\cat_outer_puzzle.py", line 11, in
from chia.wallet.cat_wallet.cat_utils import (
File "C:\chialisp\chiatest1\venv\Lib\site-packages\chia\wallet\cat_wallet\cat_utils.py", line 24, in
#dataclasses.dataclass
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tony\AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 1220, in dataclass
return wrap(cls)
^^^^^^^^^
File "C:\Users\tony\AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 1210, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tony\AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 958, in _process_class
cls_fields.append(_get_field(cls, name, type, kw_only))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tony\AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 815, in _get_field
raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'chia.types.blockchain_format.program.Program'> for field limitations_solution is not allowed: use default_factory
Any thoughts on where I might be going wrong??
For future reference I had to run this command
Set-Alias -Name chia "C:\Users[insert user here]\AppData\Local\Programs\Chia\resources\app.asar.unpacked\daemon\chia.exe"
Related
when I write the command line in terminal
bench new-site site1.local
This Error Will shown
> Traceback (most recent call last):
File "/home/ubuntu/.local/bin/bench", line 8, in <module>
sys.exit(cli())
File "/home/ubuntu/bench/bench/cli.py", line 71, in cli
cmd_from_sys = get_cmd_from_sysargv()
File "/home/ubuntu/bench/bench/utils/__init__.py", line 554, in get_cmd_from_sysargv
if sys_argv.index(arg) == 0 and arg in Bench(".").apps:
File "/home/ubuntu/bench/bench/bench.py", line 67, in __init__
self.apps = BenchApps(self)
File "/home/ubuntu/bench/bench/bench.py", line 174, in __init__
self.initialize_apps()
File "/home/ubuntu/bench/bench/bench.py", line 281, in initialize_apps
self.apps.remove("frappe")
ValueError: list.remove(x): x not in list
Note I use EC2 On AWS Ubunto server
Can Any One Help With This Problem Please.
I tried to install many lib but no help with this problem
I recently tried to install the spaCy module for Python 3.7. The installation looks like it runs successfully (shows no errors), but when I try to import spaCy, or when I try to install spaCy models, I get the error below. I'm totally lost; please help!
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\mjrei\AppData\Local\Programs\Python\Python37\lib\site-packages\spacy\__init__.py", line 14, in <module>
from . import pipeline # noqa: F401
File "C:\Users\mjrei\AppData\Local\Programs\Python\Python37\lib\site-packages\spacy\pipeline\__init__.py", line 1, in <module>
from .attributeruler import AttributeRuler
File "C:\Users\mjrei\AppData\Local\Programs\Python\Python37\lib\site-packages\spacy\pipeline\attributeruler.py", line 6, in <module>
from .pipe import Pipe
File "spacy\pipeline\pipe.pyx", line 1, in init spacy.pipeline.pipe
File "spacy\strings.pyx", line 15, in init spacy.strings
File "C:\Users\mjrei\AppData\Local\Programs\Python\Python37\lib\site-packages\spacy\util.py", line 1635, in <module>
default_error_handler: Callable[[str, "Pipe", List["Doc"], Exception], NoReturn],
File "C:\Users\mjrei\AppData\Local\Programs\Python\Python37\lib\typing.py", line 755, in __getitem__
return self.__getitem_inner__(params)
File "C:\Users\mjrei\AppData\Local\Programs\Python\Python37\lib\typing.py", line 251, in inner
return func(*args, **kwds)
File "C:\Users\mjrei\AppData\Local\Programs\Python\Python37\lib\typing.py", line 774, in __getitem_inner__
result = _type_check(result, msg)
File "C:\Users\mjrei\AppData\Local\Programs\Python\Python37\lib\typing.py", line 135, in _type_check
raise TypeError(f"Plain {arg} is not valid as type argument")
TypeError: Plain typing.NoReturn is not valid as type argument
I'm trying to open Spyder and I have deleted multiple times the "spyder.lock" folder in user/directory but it doesn't work. This is the error:
File "C:\Users\pc-acer\anaconda3\envs\EnvTest\Scripts\spyder-script.py", line 10, in <module>
sys.exit(main())
File "C:\Users\pc-acer\Anaconda3\Lib\site-packages\spyder\app\start.py", line 212, in main
mainwindow.main(options, args)
File "C:\Users\pc-acer\Anaconda3\Lib\site-packages\spyder\app\mainwindow.py", line 3685, in main
mainwindow = run_spyder(app, options, args)
File "C:\Users\pc-acer\Anaconda3\Lib\site-packages\spyder\app\mainwindow.py", line 3571, in run_spyder
main.setup()
File "C:\Users\pc-acer\Anaconda3\Lib\site-packages\spyder\app\mainwindow.py", line 886, in setup
from spyder.plugins.completion.plugin import CompletionManager
File "C:\Users\pc-acer\Anaconda3\Lib\site-packages\spyder\plugins\completion\plugin.py", line 22, in <module>
from spyder.plugins.completion.languageserver.plugin import (
File "C:\Users\pc-acer\Anaconda3\Lib\site-packages\spyder\plugins\completion\languageserver\plugin.py", line 31, in <module>
from spyder.plugins.completion.languageserver.confpage import (
File "C:\Users\pc-acer\Anaconda3\Lib\site-packages\spyder\plugins\completion\languageserver\confpage.py", line 31, in <module>
from spyder.plugins.completion.languageserver.widgets.snippetsconfig import (
File "C:\Users\pc-acer\Anaconda3\Lib\site-packages\spyder\plugins\completion\languageserver\widgets\snippetsconfig.py", line 17, in <module>
from jsonschema import validate as json_validate
File "C:\Users\pc-acer\Anaconda3\Lib\site-packages\jsonschema\__init__.py", line 34, in <module>
__version__ = metadata.version("jsonschema")
File "C:\Users\pc-acer\anaconda3\envs\EnvTest\lib\importlib\metadata.py", line 531, in version
return distribution(distribution_name).version
File "C:\Users\pc-acer\anaconda3\envs\EnvTest\lib\importlib\metadata.py", line 236, in version
return self.metadata['Version']
File "C:\Users\pc-acer\anaconda3\envs\EnvTest\lib\importlib\metadata.py", line 224, in metadata
self.read_text('METADATA')
File "C:\Users\pc-acer\anaconda3\envs\EnvTest\lib\importlib\metadata.py", line 491, in read_text
return self._path.joinpath(filename).read_text(encoding='utf-8')
AttributeError: 'WindowsPath' object has no attribute 'read_text'
I don't know what i have to do. Please help!
There might be 2 situation
You are using older version of python or something messed up so try reinstalling newer version of python
conda missing some dependencies.
conda upgrade spyder
Check this thread.
I believe that I installed Anaconda Naviagtor on linux correctly but it is getting stuck on loading applications....
(base) ben#Bens-PC:~$ anaconda-navigator
Traceback (most recent call last):
File "/home/ben/anaconda3/lib/python3.7/site-packages/anaconda_navigator/widgets/main_window.py", line 541, in setup
self.post_setup(conda_data=conda_data)
File "/home/ben/anaconda3/lib/python3.7/site-packages/anaconda_navigator/widgets/main_window.py", line 578, in post_setup
self.tab_home.setup(conda_data)
File "/home/ben/anaconda3/lib/python3.7/site-packages/anaconda_navigator/widgets/tabs/home.py", line 169, in setup
self.set_applications(applications, packages)
File "/home/ben/anaconda3/lib/python3.7/site-packages/anaconda_navigator/widgets/tabs/home.py", line 204, in set_applications
apps = self.api.process_apps(applications, prefix=self.current_prefix)
File "/home/ben/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/anaconda_api.py", line 848, in process_apps
app = app(config=self.config, process_api=self._process_api, conda_api=self._conda_api)
File "/home/ben/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/external_apps/vscode.py", line 48, in __init__
**kwargs
File "/home/ben/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/external_apps/base.py", line 43, in __init__
self.init()
File "/home/ben/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/external_apps/base.py", line 60, in init
SUBDIR, INST_EXT, INST_DIR = self._find_linux_install_dir()
File "/home/ben/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/external_apps/vscode.py", line 168, in _find_linux_install_dir
if DISTRO_NAME in ['ubuntu', 'debian']:
UnboundLocalError: local variable 'DISTRO_NAME' referenced before assignment
Any help would be great!
Try
conda update anaconda-navigator
Open and Edit the file:
".../anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/external_apps/vscode.py"
Declare this in line 159.
DISTRO_NAME = None
Indent this line with the if statement above it.
I'm installing Caffe on an Ubuntu 14.04 virtual server with CUDA installed (without driver) using https://github.com/BVLC/caffe/wiki/Ubuntu-14.04-VirtualBox-VM as inspiration. I've installed all the necessary dependencies and have followed all the instructions step by step but get the error below when I try to test the installation.
In regards to the step:
" Modify python/classify.py to add the --print_results option"
I had amended the code via in classify.py to be identical to the official caffe distribution. Not sure if that is the step that is causing the problem but thought I'd add that extra piece of information just in case.
The error i get is as below:
vagrant#vagrant-ubuntu-trusty-64:~/caffe$ sudo python python/classify.py --print_results examples/images/cat.jpg foo
libdc1394 error: Failed to initialize libdc1394
Traceback (most recent call last):
File "python/classify.py", line 14, in <module>
import caffe
File "/home/vagrant/caffe/python/caffe/__init__.py", line 1, in <module>
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver
File "/home/vagrant/caffe/python/caffe/pycaffe.py", line 15, in <module>
import caffe.io
File "/home/vagrant/caffe/python/caffe/io.py", line 2, in <module>
import skimage.io
File "/usr/local/lib/python2.7/dist-packages/skimage/io/__init__.py", line 15, in <module>
reset_plugins()
File "/usr/local/lib/python2.7/dist-packages/skimage/io/manage_plugins.py", line 89, in reset_plugins
_load_preferred_plugins()
File "/usr/local/lib/python2.7/dist-packages/skimage/io/manage_plugins.py", line 69, in _load_preferred_plugins
_set_plugin(p_type, preferred_plugins['all'])
File "/usr/local/lib/python2.7/dist-packages/skimage/io/manage_plugins.py", line 81, in _set_plugin
use_plugin(plugin, kind=plugin_type)
File "/usr/local/lib/python2.7/dist-packages/skimage/io/manage_plugins.py", line 251, in use_plugin
_load(name)
File "/usr/local/lib/python2.7/dist-packages/skimage/io/manage_plugins.py", line 295, in _load
fromlist=[modname])
File "/usr/local/lib/python2.7/dist-packages/skimage/io/_plugins/matplotlib_plugin.py", line 4, in <module>
import matplotlib.pyplot as plt
File "/usr/local/lib/python2.7/dist-packages/matplotlib/__init__.py", line 1131, in <module>
rcParams = rc_params()
File "/usr/local/lib/python2.7/dist-packages/matplotlib/__init__.py", line 975, in rc_params
return rc_params_from_file(fname, fail_on_error)
File "/usr/local/lib/python2.7/dist-packages/matplotlib/__init__.py", line 1100, in rc_params_from_file
config_from_file = _rc_params_in_file(fname, fail_on_error)
File "/usr/local/lib/python2.7/dist-packages/matplotlib/__init__.py", line 1018, in _rc_params_in_file
with _open_file_or_url(fname) as fd:
File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/usr/local/lib/python2.7/dist-packages/matplotlib/__init__.py", line 1000, in _open_file_or_url
encoding = locale.getdefaultlocale()[1]
File "/usr/lib/python2.7/locale.py", line 543, in getdefaultlocale
return _parse_localename(localename)
File "/usr/lib/python2.7/locale.py", line 475, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
Any input would be greatly appreciated. Thank you.
Check your current shell environment, these variables: LC_ALL, LC_CTYPE, LANG, LANGUAGE:
set | grep -a '^LC_ALL=.'; set | grep -a '^LC_CTYPE=.';
set | grep -a '^LANG=.'; set | grep -a '^LANGUAGE=.'
Likely the first printed line will contain one of these variables equal to 'UTF-8'. This is wrong.
A proper locale should have language and optional country and encoding specification, like 'en' or 'en_US' or 'ru_RU.UTF-8'. There's a special locale 'C' used as fallback.
So you may redefine your locale permanently in /etc/default/locale (don't forget to reload your settings, the easiest way is to logoff/logon), or simply override it for a particular command:
> LC_ALL=C python python/classify.py --print_results examples/images/cat.jpg foo
Regarding libdc1394: if you don't need interaction with FireWire check ctypes error: libdc1394 error: Failed to initialize libdc1394