git review error ValueError: No closing quotation - git-review

i'm reinstalled pip in python and module git-review. i was installs python version 2.7 and 3.9
Command "git review" is worked, i don't know what's happend but now error
Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Users\esinitsyn\AppData\Roaming\Python\Scripts\git-review.exe\__main__.py", line 9, in <module>
File "C:\Users\esinitsyn\AppData\Roaming\Python\Python27\site-packages\git_review\cmd.py", line 1714, in main
_main()
File "C:\Users\esinitsyn\AppData\Roaming\Python\Python27\site-packages\git_review\cmd.py", line 1690, in _main
(status, output) = run_command_status(cmd)
File "C:\Users\esinitsyn\AppData\Roaming\Python\Python27\site-packages\git_review\cmd.py", line 129, in run_command_status
argv = shlex.split(str(argv[0]))
File "c:\python27\lib\shlex.py", line 279, in split
return list(lex)
File "c:\python27\lib\shlex.py", line 269, in next
token = self.get_token()
File "c:\python27\lib\shlex.py", line 96, in get_token
raw = self.read_token()
File "c:\python27\lib\shlex.py", line 172, in read_token
raise ValueError, "No closing quotation"
ValueError: No closing quotation

Check the python installation and pip from terminal
Python --version in my case its shows Python 3.9.1
pip --version in my case I have pip 21.0.1 from d:\py39\lib\site-package\pip (python 3.9)
try upgrading the pip if throw error just by: pip install --upgrade pip
Now for Git-review just Copy&Paste
pip install git-review

Related

Exception for pip upgrade

I am trying to upgrade pip and keep getting this message:
You are using pip version 10.0.1, however version 21.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(base) name-MBP:~ name$ pip3 install --upgrade pip
Exception:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/basecommand.py", line 228, in main
status = self.run(options, args)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 244, in run
wheel_cache = WheelCache(options.cache_dir, options.format_control)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/cache.py", line 186, in __init__
self._ephem_cache = EphemWheelCache(format_control)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/cache.py", line 164, in __init__
self._temp_dir.create()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/utils/temp_dir.py", line 73, in create
tempfile.mkdtemp(prefix="pip-{}-".format(self.kind))
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tempfile.py", line 356, in mkdtemp
prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tempfile.py", line 126, in _sanitize_params
dir = gettempdir()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tempfile.py", line 294, in gettempdir
tempdir = _get_default_tempdir()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tempfile.py", line 229, in _get_default_tempdir
dirlist)
FileNotFoundError: [Errno 2] No usable temporary directory found in ['/var/folders/40/vdlxclg51vjf1q5y8ygtbb840000gn/T/', '/tmp', '/var/tmp', '/usr/tmp', '/Users/name']
Even when I am un/installing any thirty party packages (e.g. numpy) i am getting this exception.

conda install -c anaconda failed to install any packages via anaconda

i found that my anaconda failed to intall any packages via anaconda. Can anyone help?
(deformetrica) [qiningliu#localhost ~]$ conda install -c pytorch -c conda-forge -c anaconda -c aramislab deformetrica
Solving environment: failed
>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/home/qiningliu/anaconda3/lib/python3.6/site-packages/conda/exceptions.py", line 819, in __call__
return func(*args, **kwargs)
File "/home/qiningliu/anaconda3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main
exit_code = do_call(args, p)
File "/home/qiningliu/anaconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 77, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "/home/qiningliu/anaconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute
install(args, parser, 'install')
File "/home/qiningliu/anaconda3/lib/python3.6/site-packages/conda/cli/install.py", line 235, in install
force_reinstall=context.force,
File "/home/qiningliu/anaconda3/lib/python3.6/site-packages/conda/core/solve.py", line 505, in solve_for_transaction
force_remove, force_reinstall)
File "/home/qiningliu/anaconda3/lib/python3.6/site-packages/conda/core/solve.py", line 438, in solve_for_diff
final_precs = self.solve_final_state(deps_modifier, prune, ignore_pinned, force_remove)
File "/home/qiningliu/anaconda3/lib/python3.6/site-packages/conda/core/solve.py", line 179, in solve_final_state
index, r = self._prepare(prepared_specs)
File "/home/qiningliu/anaconda3/lib/python3.6/site-packages/conda/core/solve.py", line 560, in _prepare
self.subdirs, prepared_specs)
File "/home/qiningliu/anaconda3/lib/python3.6/site-packages/conda/core/index.py", line 215, in get_reduced_index
new_records = query_all(spec)
File "/home/qiningliu/anaconda3/lib/python3.6/site-packages/conda/core/index.py", line 184, in query_all
return tuple(concat(future.result() for future in as_completed(futures)))
File "/home/qiningliu/anaconda3/lib/python3.6/site-packages/conda/core/subdir_data.py", line 94, in query
self.load()
File "/home/qiningliu/anaconda3/lib/python3.6/site-packages/conda/core/subdir_data.py", line 148, in load
_internal_state = self._load()
File "/home/qiningliu/anaconda3/lib/python3.6/site-packages/conda/core/subdir_data.py", line 235, in _load
_internal_state = self._process_raw_repodata_str(raw_repodata_str)
File "/home/qiningliu/anaconda3/lib/python3.6/site-packages/conda/core/subdir_data.py", line 348, in _process_raw_repodata_str
info['fn'] = fn
TypeError: 'NoneType' object does not support item assignment
$ /home/qiningliu/anaconda3/bin/conda install -c pytorch -c conda-forge -c anaconda -c aramislab deformetrica
for your case isn't necesary to repeat the flag -c.
If you want to install several packages you just need to execute:
conda install -c pytorch conda-forge anaconda aramislab deformetrica

Unable to install Scipy using pip install command

I am having this
Python 3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 16:02:32) [MSC v.1900 64 bit (AMD64)] on win32
configuration and installing scipy on Python but I get this error and fail to understand the issue. Please remain on Python and not Anaconda and others.
(pip3py3) C:\Users\x\PycharmProjects\a>pip install scipy-0.19.1-cp35-cp35m-win_amd64.whl
Processing c:\users\x\pycharmprojects\a\scipy-0.19.1-cp35-cp35m-win_amd64.whl
Exception:
Traceback (most recent call last):
File "C:\Users\x\pip3py3\lib\site-packages\pip-9.0.1-py3.5.egg\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Users\x\pip3py3\lib\site-packages\pip-9.0.1-py3.5.egg\pip\commands\install.py", line 335, in run
wb.build(autobuilding=True)
File "C:\Users\x\pip3py3\lib\site-packages\pip-9.0.1-py3.5.egg\pip\wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "C:\Users\x\pip3py3\lib\site-packages\pip-9.0.1-py3.5.egg\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "C:\Users\x\pip3py3\lib\site-packages\pip-9.0.1-py3.5.egg\pip\req\req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "C:\Users\x\pip3py3\lib\site-packages\pip-9.0.1-py3.5.egg\pip\download.py", line 809, in unpack_url
unpack_file_url(link, location, download_dir, hashes=hashes)
File "C:\Users\x\pip3py3\lib\site-packages\pip-9.0.1-py3.5.egg\pip\download.py", line 715, in unpack_file_url
unpack_file(from_path, location, content_type, link)
File "C:\Users\x\pip3py3\lib\site-packages\pip-9.0.1-py3.5.egg\pip\utils\__init__.py", line 599, in unpack_file
flatten=not filename.endswith('.whl')
File "C:\Users\x\pip3py3\lib\site-packages\pip-9.0.1-py3.5.egg\pip\utils\__init__.py", line 484, in unzip_file
zip = zipfile.ZipFile(zipfp, allowZip64=True)
File "C:\Users\x\AppData\Local\Programs\Python\Python35\lib\zipfile.py", line 1026, in __init__
self._RealGetContents()
File "C:\Users\x\AppData\Local\Programs\Python\Python35\lib\zipfile.py", line 1113, in _RealGetContents
fp.seek(self.start_dir, 0)
OSError: [Errno 22] Invalid argument
My problem was somewhat strange. I solved it by installing numpy+mkl from http://www.lfd.uci.edu/~gohlke/pythonlibs/ and then scipy installation worked for me.

Can't install twython on Python 3.2 (Raspberry Pi)

I'm trying to install twython, but keep getting errors.
First attempt:
pi#raspberrypi ~/twython $ sudo pip-3.2 install twython
Running setup.py egg_info for package requests
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/home/pi/twython/build/requests/setup.py", line 52, in <module>
exec(f.read(), about)
File "<string>", line 14
__cake__ = u'\u2728 \U0001f370 \u2728'
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/home/pi/twython/build/requests/setup.py", line 52, in <module>
exec(f.read(), about)
File "<string>", line 14
__cake__ = u'\u2728 \U0001f370 \u2728'
^
SyntaxError: invalid syntax
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /home/pi/twython/build/requests
Next I searched on the last line of the error and followed some suggestions that said to make sure setuptools and ez_install were installed and up to date, but that didn't help.
Then I followed the backup instructions on ReadtheDocs that said to try to install it this way:
git clone git://github.com/ryanmcgrath/twython.git
cd twython
sudo python3 setup.py install
but it failed again:
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 640, in install_item
self.process_distribution(spec, dist, deps)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 692, in process_distribution
[requirement], self.local_index, self.easy_install
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 576, in resolve
dist = best[req.key] = env.best_match(req, self, installer)
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 822, in best_match
return self.obtain(req, installer) # try and download/install
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 834, in obtain
return installer(requirement)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 608, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 638, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 828, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1105, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1094, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 31, in run_setup
lambda: exec(compile(open(
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 73, in run
return func()
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 34, in <lambda>
{'__file__':setup_script, '__name__':'__main__'})
File "setup.py", line 52, in <module>
Error in atexit._run_exitfuncs:
TypeError: 'NoneType' object is not callable
It turns out that Twython cannot work with Python v3.2 because it depends on the requests module which apparently is not supported in Python 3.2.
One of the developers of Twython just explained this to me on Twitter.

pylint not running on MacOS

It seems that pylint on MacOS is not doing anything at all. Here is what I get. I did install pylint by doing pip install pylint
$ pylint tunnel.py
No config file found, using default configuration
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pylint/lint.py", line 910, in get_ast
return MANAGER.ast_from_file(filepath, modname, source=True)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astroid/manager.py", line 112, in ast_from_file
return AstroidBuilder(self).file_build(filepath, modname)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astroid/builder.py", line 134, in file_build
module = self._data_build(data, modname, path)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astroid/builder.py", line 177, in _data_build
module = rebuilder.visit_module(node, modname, node_file, package)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astroid/rebuilder.py", line 148, in visit_module
newnode.body = [self.visit(child, newnode) for child in node.body]
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astroid/rebuilder.py", line 148, in <listcomp>
newnode.body = [self.visit(child, newnode) for child in node.body]
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astroid/rebuilder.py", line 161, in visit
return self._transform(visit_method(node, parent))
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astroid/rebuilder.py", line 238, in visit_assign
newnode.value = self.visit(node.value, newnode)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astroid/rebuilder.py", line 161, in visit
return self._transform(visit_method(node, parent))
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astroid/rebuilder.py", line 331, in visit_callfunc
if node.starargs is not None:
AttributeError: 'Call' object has no attribute 'starargs'
************* Module temp.test
F: 1, 0: <class 'AttributeError'>: 'Call' object has no attribute 'starargs' (astroid-error)
You're mentioning that you're using pylint 1.4.4, which is quite old and won't work with Python 3.5.
You should upgrade to the latest releases of pylint/astroid, e.g. by doing pip install -U pylint.

Resources