Autocomplete-Python not working, ATOM, Error from jed, grammer 3.9.txt not found - python-3.x

I upgraded my python version from 3.8 to 3.9. I was using autocomplete-Pythonn extension. And an error came in my atom editor. That grammer3.9.txt not found.
Looks like this error originated from Jedi. Please do not report such issues in autocomplete-python issue tracker. Report them directly to Jedi. Turn off outputProviderErrors setting to hide such errors in future. Traceback output:
*Traceback (most recent call last):
File "C:\Users\hp.atom\packages\autocomplete-python\lib\jedi\parser_init_.py", line 56, in load_grammar
return _loaded_grammars[path]
KeyError: 'C:\Users\hp\.atom\packages\autocomplete-python\lib\jedi\parser\grammar3.9.txt'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\hp.atom\packages\autocomplete-python\lib\completion.py", line 376, in watch
self._process_request(request)
File "C:\Users\hp.atom\packages\autocomplete-python\lib\completion.py", line 338, in process_request
script = jedi.api.Script(
File "C:\Users\hp.atom\packages\autocomplete-python\lib\jedi\api_init.py", line 126, in init
self.grammar = load_grammar(version='%s.%s' % sys.version_info[:2])
File "C:\Users\hp.atom\packages\autocomplete-python\lib\jedi\parser_init.py", line 58, in load_grammar
return _loaded_grammars.setdefault(path, generate_grammar(path))
File "C:\Users\hp.atom\packages\autocomplete-python\lib\jedi\parser\pgen2\pgen.py", line 393, in generate_grammar
p = ParserGenerator(filename)
File "C:\Users\hp.atom\packages\autocomplete-python\lib\jedi\parser\pgen2\pgen.py", line 18, in init
stream = open(filename)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\hp\.atom\packages\autocomplete-python\lib\jedi\parser\grammar3.9.txt'
I came up with this error last time. But then I Just renamed the file grammer3.7 to grammer3.8. But I do not think this is the right way to do so.

Related

How to solve most recent call last in python?

When I run the script I get this error:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/cryptography/fernet.py", line 119, in _verify_signature
h.verify(data[-32:])
File "/usr/lib/python3/dist-packages/cryptography/hazmat/primitives/hmac.py", line 74, in verify
ctx.verify(signature)
File "/usr/lib/python3/dist-packages/cryptography/hazmat/backends/openssl/hmac.py", line 75, in verify
raise InvalidSignature("Signature did not match digest.")
cryptography.exceptions.InvalidSignature: Signature did not match digest.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/Documents/decrypt.py", line 28, in <module>
contents_decrypted = Fernet(secretkey).decrypt(contents)
File "/usr/lib/python3/dist-packages/cryptography/fernet.py", line 80, in decrypt
return self._decrypt_data(data, timestamp, time_info)
File "/usr/lib/python3/dist-packages/cryptography/fernet.py", line 137, in _decrypt_data
self._verify_signature(data)
File "/usr/lib/python3/dist-packages/cryptography/fernet.py", line 121, in _verify_signature
raise InvalidToken
cryptography.fernet.InvalidToken
I tried to run the script to decrypt my files but it shows the error.

Python Code with Plugin "Create Points Layer from Spreadsheet"

I'm new to python, that is the first problem.
Secondly I am trying to automate the task of adding vector point layers from spreadsheets (xlsx-files) with Python.
The task can be done manually with the plugin "add spreadsheet layer".
I have a folder with roughly 20 xlsx-files that need to be added into the QGIS-project as vector point layers.
I have tried the following code snippet, to check if the core task of adding a spreadsheet layer actually works:
The Computer has a Win7 OS. The program in question is Python which is contained in the program QGIS 3.4.
The Plugin that I want to control through python is called "add spreadsheet layer".
from qgis.core import *
import processing
processing.run("qgis:createpointslayerfromtable",
{'INPUT':r'C:\Users\Desktop\PlayItAll\Test.xlsx',
'XFIELD':'X_Pos',
'YFIELD':'Y_Pos',
'ZFIELD':None,
'MFIELD':None,
'TARGET_CRS':QgsCoordinateReferenceSystem('EPSG:4326'),
'OUTPUT':r'memory'})
It produces this error:
File "C:/PROGRA1/QGIS31.4/apps/qgis/./python/plugins\processing\core\Processing.py", line 183, in runAlgorithm
raise QgsProcessingException(msg)
I have contacted the programmer of the plugin and he gave me this code to try:
import processing
processing.runAndLoadResults("qgis:createpointslayerfromtable",
{
'INPUT':r'C:\Users\username\Desktop\Delete\test.xlsx',
'XFIELD':'Longitude',
'YFIELD':'Latitude',
'ZFIELD':None,
'MFIELD':None,
'TARGET_CRS':QgsCoordinateReferenceSystem('EPSG:4326'),
'OUTPUT':'memory'
})
For him it worked, for me it didn't.
I got this on the processing tab:
2019-07-03T13:19:43 CRITICAL Traceback (most recent call last):
File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python/plugins\processing\algs\qgis\PointsLayerFromTable.py", line 112, in processAlgorithm
fields, wkb_type, target_crs)
Exception: unknown
2019-07-03T13:19:43 CRITICAL Traceback (most recent call last):
File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python/plugins\processing\algs\qgis\PointsLayerFromTable.py", line 112, in processAlgorithm
fields, wkb_type, target_crs)
Exception: unknown
2019-07-03T13:19:43 CRITICAL There were errors executing the algorithm.
The "python warnings" tab showed this:
2019-07-03T13:19:43 WARNING warning:__console__:1: ResourceWarning:
unclosed file
traceback: File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python\console\console.py", line 575, in runScriptEditor
self.tabEditorWidget.currentWidget().newEditor.runScriptCode()
File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python\console\console_editor.py", line 629, in runScriptCode
.format(filename.replace("\\", "/"), sys.getfilesystemencoding()))
File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python\console\console_sci.py", line 635, in runCommand
more = self.runsource(src)
File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python\console\console_sci.py", line 665, in runsource
return super(ShellScintilla, self).runsource(source, filename, symbol)
File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\code.py", line 74, in runsource
self.runcode(code)
File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\code.py", line 90, in runcode
exec(code, self.locals)
File "", line 1, in

"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

anaconda navigator will no longer start even through cmd, won't install or update or manage environments

I'm new to django and using the anaconda cloud environment. Its been working well for 3 months plus but as of 7-24-2018 it is just stop to launch the navigator or open through cmd. I can't manage environments or install packages. Using the anaconda prompt also gives me the same error upon launching. It started when I wanted to install django-Oscar, but not having its dependencies I was forced to install the packages manually which in turn needed cytoolz that needs Microsoft Visual C++ build tools which I got to install as well but the error persists. Please help me!
Copy/Paste of CMD Traceback:
C:\Users\kaukau\Desktop>conda --version conda 4.5.4
C:\Users\kaukau\Desktop>anaconda-navigator Traceback (most recent call
last): File
"C:\Users\kaukau\Anaconda3\lib\site-packages\qtpy__init__.py", line
169, in
from PySide import version as PYSIDE_VERSION # analysis:ignore ModuleNotFoundError: No module named 'PySide'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File
"C:\Users\kaukau\Anaconda3\Scripts\anaconda-navigator-script.py", line
6, in
from anaconda_navigator.app.main import main File "C:\Users\kaukau\Anaconda3\lib\site-packages\anaconda_navigator\app\main.py",
line 22, in
from anaconda_navigator.utils.conda import is_conda_available File
"C:\Users\kaukau\Anaconda3\lib\site-packages\anaconda_navigator\utils__init__.py",
line 15, in
from qtpy.QtGui import QIcon File "C:\Users\kaukau\Anaconda3\lib\site-packages\qtpy__init__.py", line
175, in
raise PythonQtError('No Qt bindings could be found') qtpy.PythonQtError: No Qt bindings could be found
C:\Users\kaukau\Desktop>conda install qt --force Traceback (most
recent call last): File
"C:\Users\kaukau\Anaconda3\lib\site-packages\conda\common\configuration.py",
line 42, in
from cytoolz.dicttoolz import merge File "C:\Users\kaukau\Anaconda3\lib\site-packages\cytoolz__init__.py",
line 1, in
from .itertoolz import * ModuleNotFoundError: No module named 'cytoolz.itertoolz'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File
"C:\Users\kaukau\Anaconda3\lib\site-packages\conda\exceptions.py",
line 819, in call
return func(*args, **kwargs) File "C:\Users\kaukau\Anaconda3\lib\site-packages\conda\cli\main.py", line
73, in _main
from ..base.context import context File "C:\Users\kaukau\Anaconda3\lib\site-packages\conda\base\context.py",
line 23, in
from ..common.configuration import (Configuration, LoadError, MapParameter, PrimitiveParameter, File
"C:\Users\kaukau\Anaconda3\lib\site-packages\conda\common\configuration.py",
line 47, in
from .._vendor.toolz.functoolz import excepts File "C:\Users\kaukau\Anaconda3\lib\site-packages\conda_vendor\toolz\functoolz.py",
line 501
f.name for f in reversed((self.first,) + self.funcs),
^ SyntaxError: Generator expression must be parenthesized
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File
"C:\Users\kaukau\Anaconda3\lib\site-packages\conda\common\configuration.py",
line 42, in
from cytoolz.dicttoolz import merge File "C:\Users\kaukau\Anaconda3\lib\site-packages\cytoolz__init__.py",
line 1, in
from .itertoolz import * ModuleNotFoundError: No module named 'cytoolz.itertoolz'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File
"C:\Users\kaukau\Anaconda3\Scripts\conda-script.py", line 10, in
sys.exit(main()) File "C:\Users\kaukau\Anaconda3\lib\site-packages\conda\cli\main.py", line
113, in main
return conda_exception_handler(_main, *args) File "C:\Users\kaukau\Anaconda3\lib\site-packages\conda\exceptions.py",
line 1112, in conda_exception_handler
return_value = exception_handler(func, *args, **kwargs) File "C:\Users\kaukau\Anaconda3\lib\site-packages\conda\exceptions.py",
line 822, in call
return self.handle_exception(exc_val, exc_tb) File "C:\Users\kaukau\Anaconda3\lib\site-packages\conda\exceptions.py",
line 864, in handle_exception
return self.handle_unexpected_exception(exc_val, exc_tb) File "C:\Users\kaukau\Anaconda3\lib\site-packages\conda\exceptions.py",
line 876, in handle_unexpected_exception
self.print_unexpected_error_report(error_report) File "C:\Users\kaukau\Anaconda3\lib\site-packages\conda\exceptions.py",
line 932, in print_unexpected_error_report
from .base.context import context File "C:\Users\kaukau\Anaconda3\lib\site-packages\conda\base\context.py",
line 23, in
from ..common.configuration import (Configuration, LoadError, MapParameter, PrimitiveParameter, File
"C:\Users\kaukau\Anaconda3\lib\site-packages\conda\common\configuration.py",
line 47, in
from .._vendor.toolz.functoolz import excepts File "C:\Users\kaukau\Anaconda3\lib\site-packages\conda_vendor\toolz\functoolz.py",
line 501
f.name for f in reversed((self.first,) + self.funcs),
^ SyntaxError: Generator expression must be parenthesized Traceback (most recent call last): File
"C:\Users\kaukau\Anaconda3\lib\site-packages\conda\common\configuration.py",
line 42, in
from cytoolz.dicttoolz import merge File "C:\Users\kaukau\Anaconda3\lib\site-packages\cytoolz__init__.py",
line 1, in
from .itertoolz import * ModuleNotFoundError: No module named 'cytoolz.itertoolz'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File
"C:\Users\kaukau\Anaconda3\lib\site-packages\conda\cli\main.py", line
97, in main
from ..activate import main as activator_main File "C:\Users\kaukau\Anaconda3\lib\site-packages\conda\activate.py", line
11, in
from .base.context import ROOT_ENV_NAME, context, locate_prefix_by_name File
"C:\Users\kaukau\Anaconda3\lib\site-packages\conda\base\context.py",
line 23, in
from ..common.configuration import (Configuration, LoadError, MapParameter, PrimitiveParameter, File
"C:\Users\kaukau\Anaconda3\lib\site-packages\conda\common\configuration.py",
line 47, in
from .._vendor.toolz.functoolz import excepts File "C:\Users\kaukau\Anaconda3\lib\site-packages\conda_vendor\toolz\functoolz.py",
line 501
f.name for f in reversed((self.first,) + self.funcs),
^ SyntaxError: Generator expression must be parenthesized
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File
"C:\Users\kaukau\Anaconda3\lib\site-packages\conda\common\configuration.py",
line 42, in
from cytoolz.dicttoolz import merge File "C:\Users\kaukau\Anaconda3\lib\site-packages\cytoolz__init__.py",
line 1, in
from .itertoolz import * ModuleNotFoundError: No module named 'cytoolz.itertoolz'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File
"C:\Users\kaukau\Anaconda3\Scripts\conda-script.py", line 10, in
sys.exit(main()) File "C:\Users\kaukau\Anaconda3\lib\site-packages\conda\cli\main.py", line
110, in main
return ExceptionHandler().handle_exception(exc_val, exc_tb) File "C:\Users\kaukau\Anaconda3\lib\site-packages\conda\exceptions.py",
line 864, in handle_exception
return self.handle_unexpected_exception(exc_val, exc_tb) File "C:\Users\kaukau\Anaconda3\lib\site-packages\conda\exceptions.py",
line 876, in handle_unexpected_exception
self.print_unexpected_error_report(error_report) File "C:\Users\kaukau\Anaconda3\lib\site-packages\conda\exceptions.py",
line 932, in print_unexpected_error_report
from .base.context import context File "C:\Users\kaukau\Anaconda3\lib\site-packages\conda\base\context.py",
line 23, in
from ..common.configuration import (Configuration, LoadError, MapParameter, PrimitiveParameter, File
"C:\Users\kaukau\Anaconda3\lib\site-packages\conda\common\configuration.py",
line 47, in
from .._vendor.toolz.functoolz import excepts File "C:\Users\kaukau\Anaconda3\lib\site-packages\conda_vendor\toolz\functoolz.py",
line 501
f.name for f in reversed((self.first,) + self.funcs),
^ SyntaxError: Generator expression must be parenthesized
I've just found out that I cant even use any conda commands except the : >conda --version< command only.
Please help me resolve this issue without uninstalling then reinstalling anaconda completely
Sorry to waste your time, I solved it by reinstalling anaconda completely and every project started working again....thanks to those who read it, the effort is appreciated.
It usually happen when you directly download and insall anaconda normally form its website.
Updating anaconda solved this issue for me in Manjaro and will surely work on Windows as well.
use conda update anaconda-navigator command to Update Anaconda.
If it doesn't starts, restart your pc and try to open it again.

Yahoo_Finance Package for Python - Share() does not work anymore

Since today I am experiencing some errors caused by the yahoo_finance package version 1.4.
Here is a code example that is causing the error:
from yahoo_finance import Share
Apple = Share("AAPL")
Results in the following Error:
Traceback (most recent call last):
File "C:\Users\Julian\Anaconda3\lib\site-packages\yahoo_finance\__init__.py", line 120, in _request
_, results = response['query']['results'].popitem()
AttributeError: 'NoneType' object has no attribute 'popitem'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Julian\Anaconda3\lib\site-packages\yahoo_finance\__init__.py", line 123, in _request
raise YQLQueryError(response['error']['description'])
KeyError: 'error'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Julian\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2881, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-3-44fc1f59aa21>", line 1, in <module>
Apple = Share("AAPL")
File "C:\Users\Julian\Anaconda3\lib\site-packages\yahoo_finance\__init__.py", line 178, in __init__
self.refresh()
File "C:\Users\Julian\Anaconda3\lib\site-packages\yahoo_finance\__init__.py", line 142, in refresh
self.data_set = self._fetch()
File "C:\Users\Julian\Anaconda3\lib\site-packages\yahoo_finance\__init__.py", line 181, in _fetch
data = super(Share, self)._fetch()
File "C:\Users\Julian\Anaconda3\lib\site-packages\yahoo_finance\__init__.py", line 134, in _fetch
data = self._request(query)
File "C:\Users\Julian\Anaconda3\lib\site-packages\yahoo_finance\__init__.py", line 125, in _request
raise YQLResponseMalformedError()
yahoo_finance.YQLResponseMalformedError: Response malformed.
Do you experience similar issues or is this only an issue for me personally?
Thank you for your replies.
If yes - what are potential fixes for this issue?

Resources