I'm getting errors in msdt-follina - python-3.x

So, i am using ubuntu and installed msdt-follina on it. I run command python3 follina.py -c "calc.exe". It worked. Now i ran python3 follina.py -r 9999, and it gives me error:
[+] copied staging doc /tmp/9oiqeh0y
Traceback (most recent call last):
File "/home/programersandco/msdt-follina/follina.py", line 166, in <module>
main(parser.parse_args())
File "/home/programersandco/msdt-follina/follina.py", line 104, in main
shutil.make_archive(args.output, "zip", doc_path)
File "/usr/lib/python3.10/shutil.py", line 1123, in make_archive
filename = func(base_name, base_dir, **kwargs)
File "/usr/lib/python3.10/shutil.py", line 1008, in _make_zipfile
zf.write(path, arcname)
File "/usr/lib/python3.10/zipfile.py", line 1773, in write
with open(filename, "rb") as src, self.open(zinfo, 'w') as dest:
OSError: [Errno 22] Invalid argument: '/tmp/9oiqeh0y/doc/word/_rels/document.xml.rels'
I tried with first command (python3 follina.py -c "calc.exe"), but it gives me the same error. Also i deleted whole folder and install it from github again, but nothing changed.

Related

python module autopep8 problem in Linux terminal

I run ubuntu by wsl 2. I use python 3.10 version. Now when I run autopep8 the problem of your below picture comes. How can it be fixed?
when I type autopep8 --in-place -a filename.py ,this problem appears
Traceback (most recent call last):
File "/home/asib/.local/bin/autopep8", line 8, in <module>
sys.exit(main())
File "/home/asib/.local/lib/python3.10/site-packages/autopep8.py", line 4518, in main
results = fix_multiple_files(args.files, args, sys.stdout)
File "/home/asib/.local/lib/python3.10/site-packages/autopep8.py", line 4413, in fix_multiple_files
ret = _fix_file((name, options, output))
File "/home/asib/.local/lib/python3.10/site-packages/autopep8.py", line 4383, in _fix_file
return fix_file(*parameters)
File "/home/asib/.local/lib/python3.10/site-packages/autopep8.py", line 3569, in fix_file
original_source = readlines_from_file(filename)
File "/home/asib/.local/lib/python3.10/site-packages/autopep8.py", line 195, in readlines_from_file
with open_with_encoding(filename) as input_file:
File "/home/asib/.local/lib/python3.10/site-packages/autopep8.py", line 172, in open_with_encoding
encoding = detect_encoding(filename, limit_byte_check=limit_byte_check)
File "/home/asib/.local/lib/python3.10/site-packages/autopep8.py", line 182, in detect_encoding
from lib2to3.pgen2 import tokenize as lib2to3_tokenize
ModuleNotFoundError: No module named 'lib2to3'
I want when I give autopep8 command, it will work.
For example: autopep8 --in-place -a filename.py

how to solve an error related pylint installltion on vs code stdio

C:\Users\home\Desktop\projectF\Voice-Based-Email-For-ThenBlind-
master>C:/Python34/python.exe -m
pip install -U pylint --user
Downloading/unpacking pylint
Downloading/unpacking isort>=4.2.5,<5 (from pylint)
Downloading/unpacking astroid>=2.3.0,<2.4 (from pylint)
Cleaning up...
Exception:
Traceback (most recent call last):
File "C:\Python34\lib\site-
packages\pip\_vendor\pkg_resources.py", line 2421, in _dep_map
return self.__dep_map
File "C:\Python34\lib\site-
packages\pip_vendor\pkg_resources.py", line 2283, in getattr
raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map
During handling of the above exception, another exception
occurred:
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\pip\basecommand.py", line
122, in main
status = self.run(options, args)
File "C:\Python34\lib\site-packages\pip\commands\install.py",
line 278, in run
requirement_set.prepare_files(finder,
force_root_egg_info=self.bundle, bundle=self.bundle)
File "C:\Python34\lib\site-packages\pip\req.py", line 1265, in
prepare_files
req_to_install.extras):
File "C:\Python34\lib\site-
packages\pip\_vendor\pkg_resources.py", line 2232, in requires
dm = self._dep_map
File "C:\Python34\lib\site-
packages\pip_vendor\pkg_resources.py", line 2423, in _dep_map
self.__dep_map = self._compute_dependencies()
File "C:\Python34\lib\site-
packages\pip_vendor\pkg_resources.py", line 2447, in _
compute_dependencies
parsed = next(parse_requirements(distvers))
File "C:\Python34\lib\site-
packages\pip_vendor\pkg_resources.py", line 2544, in
parse_requirements
line, p, specs = scan_list(VERSION,LINE_END,line,p,
(1,2),"version spec")
File "C:\Python34\lib\site-
packages\pip_vendor\pkg_resources.py", line 2522, in scan_list
"Expected ',' or end-of-list in",line,"at",line[p:]
ValueError: ("Expected ',' or end-of-list in", 'lazy-object-proxy
==1.4.', 'at', '')
Storing debug log for failure in C:\Users\home\pip\pip.log
I meet the same issue on my Ubuntu 14.04 VM when I tried to install pylint. There was error saying "UserWarning: Unknown distribution option", which indicates the verison of my setuptools might be too old. But update didn't fix the issue. So I tried to download the source file from the project page lazy-object-proxy.1.4.3 zip file
After download the zip file, simply installed by the zip file solved my problem:
pip install PATH_TO_THE_ZIP_FILE

astropy.extern.configobj.configobj.ConfigObjError: Parsing failed with several errors

When I import the astropy package, I got the following error message.
>>> import astropy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/lalitawadee/anaconda3/lib/python3.7/site-packages/astropy/__init__.py", line 288, in <module>
log = _init_log()
File "/home/lalitawadee/anaconda3/lib/python3.7/site-packages/astropy/logger.py", line 97, in _init_log
log._set_defaults()
File "/home/lalitawadee/anaconda3/lib/python3.7/site-packages/astropy/logger.py", line 473, in _set_defaults
self.setLevel(conf.log_level)
File "/home/lalitawadee/anaconda3/lib/python3.7/site-packages/astropy/config/configuration.py", line 273, in __get__
return self()
File "/home/lalitawadee/anaconda3/lib/python3.7/site-packages/astropy/config/configuration.py", line 396, in __call__
sec = get_config(self.module)
File "/home/lalitawadee/anaconda3/lib/python3.7/site-packages/astropy/config/configuration.py", line 530, in get_config
cobj = configobj.ConfigObj(cfgfn, interpolation=False)
File "/home/lalitawadee/anaconda3/lib/python3.7/site-packages/astropy/extern/configobj/configobj.py", line 1227, in __init__
self._load(infile, configspec)
File "/home/lalitawadee/anaconda3/lib/python3.7/site-packages/astropy/extern/configobj/configobj.py", line 1316, in _load
raise error
astropy.extern.configobj.configobj.ConfigObjError: Parsing failed with several errors.
First error at line 142.
I've already tried to remove Anaconda and re-install it, but the problem still remains. Could you please help me with this? Thank you in advance.
It sounds like you somehow have a corrupt astropy config file somewhere. It would help if the error message gave the filename, but see http://docs.astropy.org/en/stable/config/ for possible locations.
For starters, I would try something at the command-line like
$ mv ~/.astropy/ ~/.astropy.bak
and try again. I don't think this should have anything specifically to do with Anaconda.

"RequirementParseError: Expected ',' or end-of-list in gitpython >=2.1.9<2.2 at <2.2"

I am trying to install "missinglink" using:
python -m pip install missinglink
However, I get the error:
Exception:
Traceback (most recent call last):
File "C:\Users\kntsaluba001\AppData\Local\Continuum\miniconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2851, in _dep_map
return self.__dep_map
File "C:\Users\kntsaluba001\AppData\Local\Continuum\miniconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2685, in __getattr__
raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\kntsaluba001\AppData\Local\Continuum\miniconda3\lib\site-packages\pip\basecommand.py", line 209, in main
status = self.run(options, args)
File "C:\Users\kntsaluba001\AppData\Local\Continuum\miniconda3\lib\site-packages\pip\commands\install.py", line 310, in run
wb.build(autobuilding=True)
File "C:\Users\kntsaluba001\AppData\Local\Continuum\miniconda3\lib\site-packages\pip\wheel.py", line 748, in build
self.requirement_set.prepare_files(self.finder)
File "C:\Users\kntsaluba001\AppData\Local\Continuum\miniconda3\lib\site-packages\pip\req\req_set.py", line 360, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "C:\Users\kntsaluba001\AppData\Local\Continuum\miniconda3\lib\site-packages\pip\req\req_set.py", line 647, in _prepare_file
set(req_to_install.extras) - set(dist.extras)
File "C:\Users\kntsaluba001\AppData\Local\Continuum\miniconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2810, in extras
return [dep for dep in self._dep_map if dep]
File "C:\Users\kntsaluba001\AppData\Local\Continuum\miniconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2853, in _dep_map
self.__dep_map = self._compute_dependencies()
File "C:\Users\kntsaluba001\AppData\Local\Continuum\miniconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2877, in _compute_dependencies
parsed = next(parse_requirements(distvers))
File "C:\Users\kntsaluba001\AppData\Local\Continuum\miniconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2980, in parse_requirements
"version spec")
File "C:\Users\kntsaluba001\AppData\Local\Continuum\miniconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2956, in scan_list
raise RequirementParseError(msg, line, "at", line[p:])
pip._vendor.pkg_resources.RequirementParseError: Expected ',' or end-of-list in gitpython >=2.1.9<2.2 at <2.2
I tried uninstalling gitpython in an attempt to fix the issue, I thought that it would just be reinstalled since its a dependency however I still get the same issue.
Consider upgrading pip version. This should solve the issue

FileExistsError: [Errno 17] File exists: '/root/analytics/venv-nerapi/lib/python3.6/lib-dynload' while creating virtual environment

$virtualenv -p python3.6m ../venv-nerapi
Above command gives following error.
Running virtualenv with interpreter /usr/local/bin/python3.6m
Using base prefix '/usr/local'
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/virtualenv.py", line 352, in copyfile
os.symlink(srcpath, dest)
FileExistsError: [Errno 17] File exists: '/usr/local/lib/python3.6/lib-dynload' -> '/root/analytics/venv-nerapi/lib/python3.6/lib-dynload'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/virtualenv.py", line 2343, in <module>
main()
File "/usr/local/lib/python3.6/site-packages/virtualenv.py", line 712, in main
symlink=options.symlink)
File "/usr/local/lib/python3.6/site-packages/virtualenv.py", line 927, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/usr/local/lib/python3.6/site-packages/virtualenv.py", line 1132, in install_python
copyfile(join(stdlib_dir, fn), join(lib_dir, fn), symlink)
File "/usr/local/lib/python3.6/site-packages/virtualenv.py", line 355, in copyfile
copyfileordir(src, dest, symlink)
File "/usr/local/lib/python3.6/site-packages/virtualenv.py", line 330, in copyfileordir
shutil.copytree(src, dest, symlink)
File "/usr/local/lib/python3.6/shutil.py", line 315, in copytree
os.makedirs(dst)
File "/usr/local/lib/python3.6/os.py", line 220, in makedirs
mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/root/analytics/venv-nerapi/lib/python3.6/lib-dynload'
I followed following Github issue thread but din't find any luck.
Could any body tell whats went wrong ?
Thanks
Turns out that there was existing venv-nerapi . Deleting existing virtual env and re-creating it worked fine.

Resources