Canopy is having difficulties updating packages, "AbortedOperationDetected" - python

I run Canopy version Version: 2.1.3.3542 (64 bit) on Windows 10.
Canopy cant manage to update any package, all results in the same
log output for a numpy update (for example):
Warming up...
Traceback (most recent call last):
File "build\bdist.win-amd64\egg\canopy_dashboard\packman\package_action_worker.py", line 54, in run
File "build\bdist.win-amd64\egg\canopy_dashboard\packman\package_action.py", line 196, in execute
File "build\bdist.win-amd64\egg\canopy_dashboard\packman\packman.py", line 626, in <lambda>
File "build\bdist.win-amd64\egg\canopy_dashboard\packman\packman.py", line 1051, in _install
File "build\bdist.win-amd64\egg\canopy_platform\cpython_packages_manager.py", line 152, in install_packages_prompt
File "build\bdist.win-amd64\egg\canopy_platform\cpython_packages_manager.py", line 137, in _install_packages_prompt
PackagesInstallationError: installation of packages ['numpy 1.11.3-3'] failed. Details below:
Traceback (most recent call last):
File "build\bdist.win-amd64\egg\canopy_platform\edm_api.py", line 64, in wrapper
File "build\bdist.win-amd64\egg\canopy_platform\edm_api.py", line 384, in install_command
File "build\bdist.win-amd64\egg\canopy_platform\edm_api.py", line 414, in _install_packages_command
File "build\bdist.win-amd64\egg\edm\core\packages_manager.py", line 124, in decorator
File "build\bdist.win-amd64\egg\edm\core\packages_manager.py", line 219, in install_command
File "build\bdist.win-amd64\egg\edm\core\packages_manager.py", line 223, in _install_command
File "build\bdist.win-amd64\egg\edm\core\packages_manager.py", line 549, in _compute_fix_aborted_actions
AbortedOperationDetected: Aborted operation detected in environment 'User'
There is absolutly 0 results on google for this error code, so stackexchange is my last resort

It looks like a previous update was force-aborted, possibly leaving the environment corrupted. Assuming that you are using the standard installer, then it should suffice to
reboot your computer
temporarily disable your anti-virus software if possible (or at least disable its more intrusive / slow functionality, such as online checking each of the tens of thousands of package files that Canopy provides),
from the Canopy Tools menu, select Troubleshoot => Reset Python environment

Related

RunTimeError: pdf Latex not install

$ schtex drawing.sch drawing.png
When I try to run the above code it says that I don't have pidflatex installed even though I have pip installed latex, tex, and pdflatex.
I have also run the following lines when testing another piece of code and it failed to obtain anything:
from sympy.utilities.misc import find_executable
find_executable('latex')
It also gave me an error
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/bin/schtex", line 8, in <module>
sys.exit(main())
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/lcapy/scripts/schtex.py", line 231, in main
cct.draw(label_nodes=args.label_nodes,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/lcapy/netlistmixin.py", line 1624, in draw
return cct.sch.draw(filename=filename, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/lcapy/schematic.py", line 792, in draw
self.tikz_draw(filename=filename, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/lcapy/schematic.py", line 597, in tikz_draw
self.circuitikz_date, self.circuitikz_version = latexrunner.circuitikz_version()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/lcapy/system.py", line 230, in circuitikz_version
self.run(tex_filename)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/lcapy/system.py", line 183, in run
checkexe('pdflatex')
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/lcapy/system.py", line 68, in checkexe
raise RuntimeError('%s is not installed' % program)
RuntimeError: pdflatex is not installed
From my experience, running these packages require to actually have a LaTeX distribution installed on your computer (which contains pdflatex).
I would recommend you using teXlive, which is one of the most common : https://www.tug.org/texlive/
You could also use MikTeX which is also a very common distribution : https://miktex.org/

exception in newsplease commoncrawl.py file

i am using newsplease library that i have cloned from https://github.com/fhamborg/news-please.
i want to use newsplease to get news artices from commoncrawl news datasets.
i am running commoncrawl.py file as instruct here.
i have used the command below -
python -m newsplease.examples.commoncrawl
on executing the following command i am getting following errors -
my_local_download_dir_warc=./cc_download_warc/
my_local_download_dir_article=./cc_download_articles/
delete_warc_after_extraction=False
my_number_of_extraction_processes=1
INFO:newsplease.crawler.commoncrawl_crawler:executing: aws s3 ls --recursive s3://commoncrawl/crawl-data/CC-NEWS/ --no-sign-request > .tmpaws.txt && awk '{ print $4 }' .tmpaws.txt && rm .tmpaws.txt
INFO:newsplease.crawler.commoncrawl_crawler:found 2 files at commoncrawl.org
INFO:newsplease.crawler.commoncrawl_crawler:creating extraction process pool with 1 processes
INFO:newsplease.crawler.commoncrawl_extractor:found local file ./cc_download_warc/https%3A%2F%2Fcommoncrawl.s3.amazonaws.com%2F, not downloading again due to configuration
Traceback (most recent call last):
File "/home/prateek/.local/lib/python3.6/site-packages/warcio/recordloader.py", line 236, in _detect_type_load_headers
rec_headers = self.arc_parser.parse(stream, statusline)
File "/home/prateek/.local/lib/python3.6/site-packages/warcio/recordloader.py", line 312, in parse
raise StatusAndHeadersParserException(msg, parts)
warcio.statusandheaders.StatusAndHeadersParserException: Wrong # of headers, expected arc headers ['uri', 'ip-address', 'archive-date', 'content-type', 'length'], Found ['<?xml', 'version="1.0"', 'encoding="UTF-8"?>']
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/prateek/.local/lib/python3.6/site-packages/newsplease/examples/commoncrawl.py", line 172, in <module>
main()
File "/home/prateek/.local/lib/python3.6/site-packages/newsplease/examples/commoncrawl.py", line 168, in main
continue_process=True)
File "/home/prateek/.local/lib/python3.6/site-packages/newsplease/crawler/commoncrawl_crawler.py", line 320, in crawl_from_commoncrawl
log_pathname_fully_extracted_warcs=__log_pathname_fully_extracted_warcs)
File "/home/prateek/.local/lib/python3.6/site-packages/newsplease/crawler/commoncrawl_crawler.py", line 230, in __start_commoncrawl_extractor
log_pathname_fully_extracted_warcs=__log_pathname_fully_extracted_warcs)
File "/home/prateek/.local/lib/python3.6/site-packages/newsplease/crawler/commoncrawl_extractor.py", line 338, in extract_from_commoncrawl
self.__run()
File "/home/prateek/.local/lib/python3.6/site-packages/newsplease/crawler/commoncrawl_extractor.py", line 292, in __run
self.__process_warc_gz_file(local_path_name)
File "/home/prateek/.local/lib/python3.6/site-packages/newsplease/crawler/commoncrawl_extractor.py", line 231, in __process_warc_gz_file
for record in ArchiveIterator(stream):
File "/home/prateek/.local/lib/python3.6/site-packages/warcio/archiveiterator.py", line 110, in _iterate_records
self.record = self._next_record(self.next_line)
File "/home/prateek/.local/lib/python3.6/site-packages/warcio/archiveiterator.py", line 262, in _next_record
self.check_digests)
File "/home/prateek/.local/lib/python3.6/site-packages/warcio/recordloader.py", line 88, in parse_record_stream
known_format))
File "/home/prateek/.local/lib/python3.6/site-packages/warcio/recordloader.py", line 243, in _detect_type_load_headers
raise ArchiveLoadFailed(msg + str(se.statusline))
warcio.exceptions.ArchiveLoadFailed: Unknown archive format, first line: ['<?xml', 'version="1.0"', 'encoding="UTF-8"?>']
what is the error here how can i resolve this.
https://github.com/fhamborg/news-please says that adopt the config section in
newsplease/examples/commoncrawl.py.
what does this mean ?
i have copied the configurations from this file and pasted in
config.cfg which is present in the newsplease/config directory.
is this what thay have instructed ? or i have made a mistake here.
i am using python 3.6. i have only one python installed in my machine.
this error is because of the libraries being used by the newsplease. mistake is made when we manually install every library, while installing focus on the versions of packages. version info of every library is given in setup.py file. install exact version given in setup.py file.
now there may be problems while executing the setup.py.
so use this command -
python3 setup.py install
if you need to uninstall all the previous verions of installed packeges then run -
pip3 freeze --user | xargs pip3 uninstall -y
for more ways to do this click here

GMIC Python plugin crashing in GIMP

I'm getting a procedure not found error when trying to call gimp_freaky_bw "from gimpfu" pdb.plug_in_gmic. This worked with an earlier installation of GIMP. I have just installed GIMP 2.8.22 and G'MIC 2.1.1. The error is:
Traceback (most recent call last):
File "C:\Program Files\GIMP 2\32\lib\gimp\2.0\python\gimpfu.py", line 736, in response
dialog.res = run_script(params)
File "C:\Program Files\GIMP 2\32\lib\gimp\2.0\python\gimpfu.py", line 361, in run_script
return apply(function, params)
File "C:\Users\tommy\.gimp-2.8\plug-ins\DIEGO_ARTISTIC_JamackSketch.py", line 124, in JamackSketch
pdb.plug_in_gmic(newImage, FreakyBW, 1, # 1=input only active layer
error: procedure not found
In recent versions of the GMIC plugin the entry point is:
pdb.plug_in_gmic_qt(image, drawable, input, output, command)
and not plug_in_gmic as in the reported error. So, fix the python script, or contact the author to get it fixed.

Spyder won't connect to kernel / iPython console

Since my laptop crashed (for unknown reason) last night, Spyder has not been able to connect to a kernel. I am getting this error:
IOError: Could not find u'kernel-1809.json' in ['.', '~/Library/Jupyter/runtime']
(The name of the json file changes each time I attempt to launch an iPython console.)
This does not seem to be related to the matplotlib 1.5 issue, that I have seen elsewhere on here - it is using 1.4.3.
iPython (version 4.0.0) runs fine from the command line.
Mac 10.10.1 (Yosemite). Spyder 2.3.7. Python 2.7.10 64bits, Qt 4.8.7, PyQt4 (API v2) 4.11.3 on Darwin
UPDATED TO INCLUDE LOGS
>>> /Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/nbformat/current.py:19: UserWarning: nbformat.current is deprecated.
- use nbformat for read/write/validate public API
- use nbformat.vX directly to composing notebooks of a particular version
ERROR: 3rd party plugin import failed for `p_pylint`
Traceback (most recent call last):
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/otherplugins.py", line 53, in get_spyderplugins_mods
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderplugins/p_pylint.py", line 23, in <module>
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderplugins/widgets/pylintgui.py", line 71, in <module>
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderplugins/widgets/pylintgui.py", line 61, in get_pylint_version
File "subprocess.pyc", line 710, in __init__
File "subprocess.pyc", line 1335, in _execute_child
OSError: [Errno 2] No such file or directory
Traceback (most recent call last):
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/plugins/externalconsole.py", line 925, in <lambda>
give_focus=give_ipyclient_focus))
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/plugins/externalconsole.py", line 1033, in register_ipyclient
give_focus=give_focus)
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/plugins/ipythonconsole.py", line 836, in register_client
self.connect_client_to_kernel(client)
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/plugins/ipythonconsole.py", line 1048, in connect_client_to_kernel
client.password)
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/plugins/ipythonconsole.py", line 1017, in create_kernel_manager_and_client
cf = find_connection_file(connection_file)
File "/Volumes/Spyder-Py2/Spyder-Py2.app/Contents/Resources/lib/python2.7/jupyter_client/connect.py", line 185, in find_connection_file
raise IOError("Could not find %r in %r" % (filename, path))
IOError: Could not find u'kernel-2018.json' in ['.', u'/Users/garyspatterson/Library/Jupyter/runtime']
** Further update **
I deleted all files under the .spyder2/ folder in my user directory, reopened Spyder, and it was able to connect to an iPython console. So far, so good. Trouble is, when I added a path to the PYTHONPATH manager (so I could import external modules, such as nltk), I am back to getting the same error.
Had a similar issue and was able to resolve it by creating a new virtualenv with the same dependencies installed.
Now Spyder is working with the PYTHONPATH pointing at lib/python2.7/site-packages of the new environment.

Python Error while building code using waf

I had code that worked fine. I shut down my PC (Ubuntu) and then, built the same software (ns-3) and now I get the error:
Traceback (most recent call last):
File "./waf", line 148, in <module>
Scripting.prepare(t, cwd, VERSION, wafdir)
File "/home/ns-allinone-3.6/ns-3.6/.waf-1.5.8-12763e767c863088b8579dbeeb8265b6/wafadmin/Scripting.py", line 102, in prepare
prepare_impl(t,cwd,ver,wafdir)
File "/home/ns-allinone-3.6/ns-3.6/.waf-1.5.8-12763e767c863088b8579dbeeb8265b6/wafadmin/Scripting.py", line 95, in prepare_impl
main()
File "/home/ns-allinone-3.6/ns-3.6/.waf-1.5.8-12763e767c863088b8579dbeeb8265b6/wafadmin/Scripting.py", line 130, in main
fun(ctx)
File "/home/ns-allinone-3.6/ns-3.6/.waf-1.5.8-12763e767c863088b8579dbeeb8265b6/wafadmin/Scripting.py", line 269, in build
bld=check_configured(bld)
File "/home/ns-allinone-3.6/ns-3.6/.waf-1.5.8-12763e767c863088b8579dbeeb8265b6/wafadmin/Scripting.py", line 219, in check_configured
bld.load_dirs(proj[SRCDIR],proj[BLDDIR])
File "/home/ns-allinone-3.6/ns-3.6/.waf-1.5.8-12763e767c863088b8579dbeeb8265b6/wafadmin/Build.py", line 245, in load_dirs
self.load()
File "/home/ns-allinone-3.6/ns-3.6/.waf-1.5.8-12763e767c863088b8579dbeeb8265b6/wafadmin/Build.py", line 78, in load
if f:data=cPickle.load(f)
EOFError
I am just amazed at this, how could 2 minutes before everything was fine and now I am screwed by this error.
What should I do, I am totally bewildered. I have a deadline and suddenly this code stops, it worked fine, only change I did was to switch off my PC.
NS-3.6 is a very very old ns-3 release which you are trying to build with a new system (gcc compiler, python etc). I think the only solution to solve the problem is to update the simulator to a new release.
Try to rebuild it. First write: rm -rf build and build from scratch

Categories

Resources