ValueError: URL must include a 'scheme', 'host', and 'port' component - elasticsearch

Trying to use elastic search for a project.
from elasticsearch import Elasticsearch
es = Elasticsearch(
"https://example.com",
http_auth=("abc", "bcd"),
)
But getting the error:
ValueError: URL must include a 'scheme', 'host', and 'port' component (ie 'https://localhost:9200')
I am running this on Pycharm CE and have created a Virtual Environment of Python 3.9 .
Should I be using a different version of Python to make this work??
Moreover, I have already tried pip install acryl-datahub[datahub-rest,elasticsearch]==0.8.27.1 but to no avail.

I was facing the same error. Installing ES version 7.17 solved the problem. I was also getting a not available on pip install acryl-datahub[datahub-rest,elasticsearch]==0.8.27.1. Tried with the next one available (0.8.28.0) and realized it was downgrading elasticsearch to 7.17.
So try pip install elasticsearch==7.17.

Related

Composer installing wrong version of ElasticSearch

I am requiring "elasticsearch/elasticsearch": "^7.1.1" in my Laravel project composer.json file, and when I perform "composer install" it says "- Downloading elasticsearch/elasticsearch (v7.11.0)". However, the actual version that is installed seems to be 6.8.14, as output by the curl -XGET 'http://localhost:9200' command and as displayed in Kibana.
I have tried running "composer clearcache", deleting the vendor folder and composer.lock, rerunning "composer install", then restarting Elasticsearch, but the actual installed version does not seem to change.
Previously Elasticsearch was being installed as a dependency of "ruflin/elastica": "7.*", and it was still installing as version 6.8.14, even though ruflin/elastica": "7.* requires Elasticsearch ^7.1.1.
When we call the \Elastica\Index updateDocument() method in ruflin/elastica, it throws the error "Document mapping type name can't start with '_', found: [_update]" which I assume is being caused by the failure to upgrade the Elasticsearch version. What is the best way to fix this?

PyMesh problems with Setup on Windows10 and Error using Docker Version

I want to install PyMesh on a Windows 10 PC, if possible it should be installed in the side-packages of an interpreter delivered with the IDE we use.
I tried the way to run the setup discribed here
https://pymesh.readthedocs.io/en/latest/installation.html
so the part :
git clone https://github.com/PyMesh/PyMesh.git
cd PyMesh
git submodule update --init
worked without any problems.
I am not sure on windows if I now just can write
set PYMESH_PATH = path
and if i can use the path "...\PyMesh\PyMesh" here?
so i left out this part
I installed numpy and scipy (allready installed)
and nose because it is mentioned in the requirements.txt.
So my numpy scipy and nose versions are
numpy 1.19.1
scipy 1.6.0
nose 1.3.7 (same as requirenments)
and just run the setup.py with admin rights
python .\setup.py install
which also seemed to work but i got an error trying
python -c "import pymesh; pymesh.test()"
from the PyMesh folder
saying ModuleNotFoundError: No module named 'PyMesh'
or if i go up one Folder doing the same
saying AttributeError: module 'PyMesh' has no attribute 'triangle'
I found this link ImportError: No module named PyMesh
but i just dont know what i should type in there
I tried to install via pip by using pip install pymesh
but pip Installer gives me a different library.
So i tried in the docker version and in docker i tried the pymesh.load_mesh method with an stl File
but got
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
I dont know if this is just the stl format (expecting binary getting ascii or vice versa)
The stl file itself can be opened so shouldnt be corrupted.
So is there a different way to install pymesh? A wheel would be great. Is it possible to install pymesh to the side-packages of a given Interpreter? Did someone else allready had the same error in Docker and knows the issue
thank you for your help

pythonAnywhere AttributeError : module 'pytube' has no attribute 'YouTube'

I am making a project with Django and pytube in python 3.6, but when I run the code below in my python anywhere project, I get this error:
AttributeError : module 'pytube' has no attribute 'YouTube'.
import pytube
url = input()
yt = pytube.YouTube(url)
This probably is because there are multiple packages named pytube, and I think that I installed the wrong one. Which one do I have to install? And should I than use pip or pip3?
I already tried uninstalling pytube and reinstalling (also via the GitHub link which you can find from other people who are having issues with this: git+https://github.com/nficano/pytube.git)

installation jupyterlab-sql on jupyterlab doesn't work

I followed the doc to install jupyterlab-sql but I don't get the SQL launcher in jupyterlab.
jupyter labextension list
returns
JupyterLab v2.1.0
Known labextensions:
app dir: c:\users\loicm\appdata\local\continuum\anaconda3\share\jupyter\lab
#jupyterlab/toc v0.6.0 enabled X
jupyterlab-sql v0.3.3 enabled X
The following extension are outdated:
#jupyterlab/toc
jupyterlab-sql
Consider running "jupyter labextension update --all" to check for updates.
and jupyter labextension update --all
returns
An error occured.
AttributeError: 'list' object has no attribute 'items'
What can I do to get the SQL launcher to work in jupyterlab?
Yours sincerely
Loïc
Same problem occurs after I updated jupyterlab to 2.x
If you check the github page of these extensions, you'll find they only work on jupyterlab 1.x, 2.x is not supported maybe because it was just released.

Invalid parameter elasticsearch_package_name on Elasticsearch_plugin

OS : 'CentOS 6.5
'
ElasticSearch version : '2.3.0'
Master's puppet version: '3.8.7'
Client's puppet version : '3.7.4'
Base module version before upgrade : '0.10.2'
Base module version after upgrade : '5.1.0'
Error: could not retrieve catalog from remote server: Error 400 on
SERVER: invalid parameter elasticsearch_package_name on
Elasticsearch_plugin[license] at
/etc/puppet/environments/production/modules/elasticsearch/manifests/plugin.pp:169
on node bla-test01.dom'
Hi,
This error started after we upgraded our Elasticsearch's base (Official from puppet forge) module from version '0.10.2' to '5.1.0'. Our puppet module of elasticsearch worked just fine before the upgrade.
Since the upgrade this error occurred whenever puppet ran on our nodes.
After we saw this case we tried to restart our puppetserver service. Since the restart, the error occurs once every 3-4 runs of puppet and we have no idea why.
Looking at the elastic/elasticsearch module which is the one you seem to be using i can see that the elastic_plugin custom type did not have the elasticsearch_package_name parameter in version 0.11.0 however the 5.1.0 version does. This looks to me that you may have updated the module on the system but have not restarted the puppet server so it still has the 0.11.0 custom type/provider ruby files loaded.
Restart the puppet master server and see if that fixes the issue

Resources