Giant IPKernelApp Error Using Hydrogen in Atom - ipython

Starting a few days ago, after months without issue, I began having a giant error box keep popping up when editing my code in Atom. I believe it is from the Hydrogen plugin, the weird thing is even with this error the code still runs and does what I want it too.
I created a new conda environment, installing only what I needed (pandas, geopandas, descartes, jupyter) and even when using the new environment in Atom I am getting this issue. I've tried upgrading ipykernel but it is already the most recent version.
Error Message
[IPKernelApp] ERROR | Exception in message handler: Traceback (most recent call last): File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/ipykernel/kernelbase.py", line 268, in dispatch_shell yield gen.maybe_future(handler(stream, idents, msg)) File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/tornado/gen.py", line 762, in run value = future.result() File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/tornado/gen.py", line 234, in wrapper yielded = ctx_run(next, result) File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/ipykernel/kernelbase.py", line 583, in complete_request matches = yield gen.maybe_future(self.do_complete(code, cursor_pos)) File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/ipykernel/ipkernel.py", line 360, in do_complete return self._experimental_do_complete(code, cursor_pos) File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/ipykernel/ipkernel.py", line 385, in _experimental_do_complete completions = list(_rectify_completions(code, raw_completions)) File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/IPython/core/completer.py", line 484, in rectify_completions completions = list(completions) File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/IPython/core/completer.py", line 1818, in completions for c in self._completions(text, offset, _timeout=self.jedi_compute_type_timeout/1000): File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/IPython/core/completer.py", line 1861, in _completions matched_text, matches, matches_origin, jedi_matches = self._complete( File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/IPython/core/completer.py", line 2029, in _complete completions = self._jedi_matches( File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/IPython/core/completer.py", line 1373, in _jedi_matches interpreter = jedi.Interpreter( File "/home/username/anaconda3/envs/fresh/lib/python3.8/site-packages/jedi/api/init.py", line 725, in init super().init(code, environment=environment, TypeError: init() got an unexpected keyword argument 'column'

The latest jedi (0.18) release is incompatible with IPython 7.19 see this discussion. IPython: 7.20 (released Feb 1st 2020) and 8.0 (not yet released) have a compatibility fix.
The correct workaround at this time is to upgrade IPython:
pip install -U ipython==7.20
In future you can search for the final two lines of the trackback after removing all path fragments specific to your installation, this is searching for:
line 2029, in _complete completions = self._jedi_matches IPython/core/completer.py, line 1373, in _jedi_matches interpreter = jedi.Interpreter( jedi/api/init.py, line 725, in init super().init(code, environment=environment, TypeError: init() got an unexpected keyword argument 'column'
This will give you the relevant issues on GitHub in the first two Google result as for today.

Related

Error encountered when using Autodock/Vina Plugin in PyMOL

I am a beginner to PyMOL and I am using it for my docking project. I have encountered errors using the Autodock/Vina plugin in PyMOL.
I was trying to carry out the set up for the grid and Error 1 occurred when I was clicking on the arrow that allows me to change the grid parameter x,y and z.
As for Error 2, it occurs when I tried to generate the receptor on the next page.
Under the log section, I also got a notice saying "Batch: prepare_receptor4.py -r C:\Users\User\Desktop\plugin-test\receptor.3ig7.pdb -o C:\Users\User\Desktop\plugin-test\receptor.3ig7.pdbqt -A checkhydrogen"
It would be appreciated if you would tell me what is missing or should be done to solve these errors.
I look forward to reading any of your replies and I thank you in advance,
Elayne
Error: 1
TypeError Exception in Tk callback
Function: <bound method Autodock.n_points_Y_changed of <pmg_tk.startup.autodock_plugin.Autodock object at 0x0000020649CD9388>> (type: <class 'method'>)
Args: ('scroll', '1', 'units')
Traceback (innermost last):
File "C:\Users\User\AppData\Local\Schrodinger\PyMOL2\lib\site-packages\Pmw.py", line 1823, in __call__
return self.func(*args)
TypeError: n_points_Y_changed() takes 2 positional arguments but 4 were given
Error: 2
FileNotFoundError Exception in Tk callback
Function: <bound method Autodock.generate_receptor of <pmg_tk.startup.autodock_plugin.Autodock object at 0x0000020649CD9388>> (type: <class 'method'>)
Args: ()
Traceback (innermost last):
File "C:\Users\User\AppData\Local\Schrodinger\PyMOL2\lib\site-packages\Pmw.py", line 1823, in __call__
return self.func(*args)
File "C:\Users\User\AppData\Local\Schrodinger\PyMOL2\lib\site-packages\pmg_tk\startup\autodock_plugin.py", line 1940, in generate_receptor
result, output = getstatusoutput(command)
File "C:\Users\User\AppData\Local\Schrodinger\PyMOL2\lib\site-packages\pmg_tk\startup\autodock_plugin.py", line 85, in getstatusoutput
p = Popen(args, stdout=PIPE, stderr=STDOUT, stdin=PIPE, env=env)
File "C:\Users\User\AppData\Local\Schrodinger\PyMOL2\lib\subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "C:\Users\User\AppData\Local\Schrodinger\PyMOL2\lib\subprocess.py", line 1207, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
I'm also encountering the same issue on Windows, try running a linux distro on vmware and make sure to install Pymol with support for Python 2.7 because the script is not compatible with Python3.

Anaconda 3 throwing error when installed in Linux Mint 19

I had a previous version of Anaconda 2 (working with Python 2.7), which I uninstalled to newly install Anaconda 3 (to work with Python 3.x).
While the previous Anaconda 2 was working fine, the newly installed Anaconda 3 throws the following error:
Traceback (most recent call last):
File "/home/partha/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/partha/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/partha/anaconda3/lib/python3.7/site-packages/anaconda_navigator/widgets/tabs/home.py", line 169, in setup
self.set_applications(applications, packages)
File "/home/partha/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/partha/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/partha/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/external_apps/vscode.py", line 48, in __init__
**kwargs
File "/home/partha/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/external_apps/base.py", line 43, in __init__
self.init()
File "/home/partha/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/partha/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 to get started with the new installation will be much appreciated.
I am using Linux Mint 19 with the following info:
...$ cat /etc/linuxmint/info
RELEASE=19
CODENAME=tara
EDITION="Xfce"
DESCRIPTION="Linux Mint 19 Tara"
DESKTOP=Gnome
TOOLKIT=GTK
NEW_FEATURES_URL=http://www.linuxmint.com/rel_tara_xfce_whatsnew.php
RELEASE_NOTES_URL=http://www.linuxmint.com/rel_tara_xfce.php
USER_GUIDE_URL=help:linuxmint
GRUB_TITLE=Linux Mint 19 Xfce
...$
A quick google search showed that an issue was open about your problems few days ago in github
Fortunately a workaround was posted:
Editing the file: ".../anaconda3//lib/python3.7/site-packages/anaconda_navigator/api/external_apps/vscode.py"
By declaring the variable outside the loop.
Just add the line:
DISTRO_NAME = None
on Line 159 and indent it in line with the if above it (Outside it)
I got a similar experience this morning. But I was able to resolve mine by typing this into my command-line interface(CLI).
conda update anaconda-navigator
I hope this work for you.

bitbake fails at the simplest recipe

Just installed Yocto. On a morty branch. Executed the following commands:
cd poky
source oe-init-build-env build-qemuarm
In conf/local.conf changed the name of the machine to MACHINE ?= "qemuarm"
Then executed the following:
$ bitbake core-image-minimal
Loading cache: 100% |##########################################################################################################| Time: 0:00:00
Loaded 1320 entries from dependency cache.
ERROR: Execution of event handler 'sstate_eventhandler2' failed
Traceback (most recent call last):
File "/home/some-user/projects/melp/poky/meta/classes/sstate.bbclass", line 1015, in sstate_eventhandler2(e=<bb.event.ReachableStamps object at 0x7fbc17f2e0f0>):
for l in lines:
> (stamp, manifest, workdir) = l.split()
if stamp not in stamps:
ValueError: not enough values to unpack (expected 3, got 1)
ERROR: Command execution failed: Traceback (most recent call last):
File "/home/some-user/projects/melp/poky/bitbake/lib/bb/command.py", line 101, in runAsyncCommand
self.cooker.updateCache()
File "/home/some-user/projects/melp/poky/bitbake/lib/bb/cooker.py", line 1658, in updateCache
bb.event.fire(event, self.databuilder.mcdata[mc])
File "/home/some-user/projects/melp/poky/bitbake/lib/bb/event.py", line 201, in fire
fire_class_handlers(event, d)
File "/home/some-user/projects/melp/poky/bitbake/lib/bb/event.py", line 124, in fire_class_handlers
execute_handler(name, handler, event, d)
File "/home/some-user/projects/melp/poky/bitbake/lib/bb/event.py", line 96, in execute_handler
ret = handler(event)
File "/home/some-user/projects/melp/poky/meta/classes/sstate.bbclass", line 1015, in sstate_eventhandler2
(stamp, manifest, workdir) = l.split()
ValueError: not enough values to unpack (expected 3, got 1)
It looks like it is a python error. Does anyone know what is the issue? Am I using the wrong version?
Here is the output of python --version
$ python --version
Python 2.7.12
What am I doing wrong?
You realise that Morty is 18 months old and in a few weeks will be longer supported right?
Anyway, looks like the sstate-cache/ somehow is corrupted. Delete your tmp/ and sstate-cache/ directories and try again.

PyPDF2 giving me an invalid argument error

I'm trying to parse text from pdf file. while I was doing tutorial of how to PyPDF2 I got the following error. I did the search for an answer but ended up finding none. Any Help will be greatly appreciated.
Traceback (most recent call last):
File "D:/text_recognizer/main.py", line 4, in <module>
inputStream = PyPDF2.PdfFileReader(input)
File "D:\KimKanna's Class\python27\lib\site-packages\PyPDF2\pdf.py", line 1084, in __init__
self.read(stream)
File "D:\KimKanna's Class\python27\lib\site-packages\PyPDF2\pdf.py", line 1689, in read
stream.seek(-1, 2)
IOError: [Errno 22] Invalid argument
here is fullcode
import PyPDF2
with open(".\\pdf\\test_sample.pdf","rb") as input:
inputStream = PyPDF2.PdfFileReader(input)
In my case the .pdf I wanted to open is empty and not closed from previous python code in powershell(cmd prompt). So, when I tried to delete those files it says 'Close the file and try again'. (that was my "AHaa" moment)
So I stopped the py.exe from my Windows task manager and deleted those empty, not closed files. Then I run the same code with another files, It worked fine.. :)

iptest3 with IPython

I'm brand new to Python programming and trying to get myself a functional base from which I can run things like the IPython Notebook which looks pretty exciting.
Thus far I have both Python 2.7 and 3.3 from python.org installed in OS X 10.6 (Snow Leopard) as well as ActiveTcl 8.5.13. Almost everything that I've tried thus far works as expected. I'm focused on learning 3.3, but want to have the option of using 2.7 too. I read up in several documents that I need to start gaining access to PyPI packages using a Python package manager and that distribute is the one I should use for 3k. So I installed that according to the documentation I found and it seemed to work fine.
I also installed pip as directed, and a number of others.
At this point, I have:
$ pip freeze
distribute==0.6.34
ipython==0.13.1
nose==1.2.1 (installed after IPython)
pexpect==2.4 (installed after IPython)
pyflakes3k==0.4.3
readline==6.2.4.1 (installed after IPython)
At this point, I'm doing this from ipython.org guidance
And when I did $ easy_install pexpect, I got a bunch of errors:
$ easy_install pexpect
Searching for pexpect
Reading http://pypi.python.org/simple/pexpect/
Reading http://pexpect.sourceforge.net/
Reading http://sourceforge.net/project/showfiles.php?group_id=59762
Best match: pexpect 2.4
Downloading http://pypi.python.org/packages/source/p/pexpect/pexpect-2.4.tar.gz#md5=fe82d69be19ec96d3a6650af947d5665
Processing pexpect-2.4.tar.gz
Writing /var/folders/td/td0Sh8EfGFuMCnKex1v+q++++TI/-Tmp-/easy_install-s4dtyy/pexpect-2.4/setup.cfg
Running pexpect-2.4/setup.py -q bdist_egg --dist-dir /var/folders/td/td0Sh8EfGFuMCnKex1v+q++++TI/-Tmp-/easy_install-s4dtyy/pexpect-2.4/egg-dist-tmp-5h5cg4
File "build/bdist.macosx-10.6-intel/egg/fdpexpect.py", line 36
raise ExceptionPexpect, 'The fd argument is not a valid file descriptor.'
^
SyntaxError: invalid syntax
File "build/bdist.macosx-10.6-intel/egg/FSM.py", line 77
return `self.value`
^
SyntaxError: invalid syntax
File "build/bdist.macosx-10.6-intel/egg/pexpect.py", line 82
except ImportError, e:
^
SyntaxError: invalid syntax
zip_safe flag not set; analyzing archive contents...
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/pexpect-2.4-py3.3.egg/fdpexpect.py", line 36
raise ExceptionPexpect, 'The fd argument is not a valid file descriptor.'
^
SyntaxError: invalid syntax
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/pexpect-2.4-py3.3.egg/FSM.py", line 77
return `self.value`
^
SyntaxError: invalid syntax
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/pexpect-2.4-py3.3.egg/pexpect.py", line 82
except ImportError, e:
^
SyntaxError: invalid syntax
Adding pexpect 2.4 to easy-install.pth file
Installed /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/pexpect-2.4-py3.3.egg
Processing dependencies for pexpect
Finished processing dependencies for pexpect
That looks bad to me (although I don't yet have the expertise to really interpret it), and so I'm not sure if I have a complete install of pexpect.
After installing nose (before pexpect as per URL above), I tried running iptest and iptest3 from the command line, and both failed to find the command, but after I did easy_install ipython again (after nose), I noticed that this install added iptest3 (as well as ipcluster3 and a few other scripts) to my path, and now my bash shell can find iptest3, but when I run it, I get some more bad-looking output:
$ iptest3
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.3/bin/iptest3", line 9, in <module>
load_entry_point('ipython==0.13.1', 'console_scripts', 'iptest3')()
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/distribute-0.6.34-py3.3.egg/pkg_resources.py", line 343, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/distribute-0.6.34-py3.3.egg/pkg_resources.py", line 2308, in load_entry_point
return ep.load()
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/distribute-0.6.34-py3.3.egg/pkg_resources.py", line 2014, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/IPython/__init__.py", line 43, in <module>
from .config.loader import Config
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/IPython/config/__init__.py", line 16, in <module>
from .application import *
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/IPython/config/application.py", line 31, in <module>
from IPython.config.configurable import SingletonConfigurable
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/IPython/config/configurable.py", line 26, in <module>
from .loader import Config
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/IPython/config/loader.py", line 27, in <module>
from IPython.utils.path import filefind, get_ipython_dir
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/IPython/utils/path.py", line 25, in <module>
from IPython.utils.process import system
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/IPython/utils/process.py", line 27, in <module>
from ._process_posix import _find_cmd, system, getoutput, arg_split
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/IPython/utils/_process_posix.py", line 22, in <module>
from IPython.external import pexpect
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/IPython/external/pexpect/__init__.py", line 2, in <module>
import pexpect
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/pexpect-2.4-py3.3.egg/pexpect.py", line 82
except ImportError, e:
^
SyntaxError: invalid syntax
After doing all that, I noted that my /Library/Frameworks/Python.framework/Versions/Current had been pointing to 2.7, and I guessed that that might be related to my problems and changed the symbolic link to point to 3.3, but iptest3 still fails with the error above.
Any other thoughts on what to do to fix this? It's clear that iptest is pretty important to doing anything else (like IPython Notebook) I want to do.
There is a py3-compatible fork of pexpect called pexpect-u (the u is for unicode, the main difference between the two). You need this to run the pexpect-based parts of IPython on Python 3.
Should be a simple
pip install pexpect-u
side note: pexpect-u is by IPython developer Thomas Kluyver, who did most of the heavy lifting bringing py3 compatibility to IPython.