I'm using the gradio library with one of the basic examples, but am getting this error. I am running this in a Google Colab Notebook. Here is the relevant lines of code:
fare = gr.inputs.Slider(minimum=0, maximum=1000, default=100, label="Fare (british pounds)")
gr.Interface(predict_survival, [sex, age, fare], "label", live=True).launch();
The error is:
MissingSchema: Invalid URL 'None': No schema supplied. Perhaps you meant http://None?
This error happens with older versions of Gradio. Please force upgrade to the latest version of Gradio (sometimes colab doesn't do this automatically):
pip install gradio --upgrade
Related
I am trying to gather a list of users that follow a specific main user using twint in pycharm. I keep getting these errors when I run my code though.
CRITICAL:root:twint.get:User:'NoneType' object is not subscriptable
CRITICAL:root:twint.feed:Follow:IndexError
Here is my code:
import twint
import nest_asyncio
nest_asyncio.apply()
c = twint.Config()
c.Username = "brendan_webdev"
c.Followers = True
c.Resume = "resume.txt"
c.Output = "testing.csv"
twint.run.Following(c)
I have no idea why this isn't running. All the tutorials I have seen have had almost this exact code and seemed to work.
I also tried running command line for twint, but my machine won't recognize that twint exists on it.
I tried running this in command line as a test, after pip installing twint and cloning the repository.
twint -u "brendan_webdev"
Nothing seems to work. I have no idea why either.
Any help is appreciated!
Note: I am running Python 3.9 btw.
The error you are getting seems to be related to the version of twint that you are using.
Upgrade to the latest version using this command:
pip3 install --upgrade -e git+https://github.com/twintproject/twint.git#origin/master#egg=twint
This fixed the error for me.
Please, I have been having trouble for weeks now trying to install and run tensorflow and keras in R Studio. I have tried everything I can find online to no avail. I have anaconda installed on my system, do I need to uninstall it? After running this line of code:
install_tensorflow(method = "conda",version = "default", envname = "py3.6",
conda_python_version = "3.6",
extra_packages = c("matplotlib","numpy","pandas","scikit-learn"))
install_keras(method = "conda")
It says installation successful, but when I now run tf$constant("Hellow Tensorflow") I get the following error message:
Error: Installation of TensorFlow not found.
Python environments searched for 'tensorflow' package:
C:\Users\IFEANYI\AppData\Local\r-miniconda\envs\r-reticulate\python.exe
You can install TensorFlow using the install_tensorflow() function.
I also try to install keras using:
install_keras(method = "conda")
install_keras(tensorflow = "default")
But I also get an error message:
Error in install_keras(method = "conda") :
You should call install_keras() only in a fresh R session that has not yet initialized Keras and TensorFlow (this is to avoid DLL in use errors during installation)
I also have reticulate installed in R Studio. I honestly do not know why it is such a task to install and run tensorflow in R for windows 10. I have been on it for weeks without any tangible headway. Please, as always I will be extremely grateful if someone can help me resolve this nagging issue
there have been significant changes to the installation pathway in the R package recently. Can you please try the following (in a fresh R session):
install.packages("keras")
reticulate::install_miniconda()
keras::install_keras()
If the above doesn't work, can you please file an issue: https://github.com/rstudio/keras/issues/new
If you are working in a project environment in RStudio, I suggest closing the project using Close Project option in the upper-right slider in RStudio. Make sure you have installed Python on your system and try the following codes (change Username based on the user name of your system):
library(keras)
library(tensorflow)
library(reticulate)
path_to_python <- "C:/Users/Username/AppData/Local/Programs/Python/Python310"
virtualenv_create("r-reticulate", python = path_to_python)
install_tensorflow(envname = "r-reticulate")
install_keras(envname = "r-reticulate")
use_virtualenv("r-reticulate")
I hope it works.
I'm trying to do a personal project for my portfolio, I would like to scrape the tweets about the president Macron but I get this error with twitterscrapper.
from twitterscraper import query_tweets
import datetime as dt
import pandas as pd
begin_date=dt.date(2020,11,18)
end_date=dt.date(2020,11,19)
limit=1000
lang='English'
tweets=query_tweets("#macron",begindate=begin_date,enddate=end_date,limit=limit,lang=lang)
Error:
TypeError: query_tweets() got an unexpected keyword argument 'begindate'
May I know how to solve it?
The code is fine, the problem is that you installed the outdated version of twitterscraper.
You may update your package by using pip install twitterscraper --upgrade
or
pip install twitterscraper==1.6.1 to ensure it is the latest
I am trying to use Watson Developer in my Jupyter Notebook, but for some reason I am getting error like this.
This is the import part:
import json
from watson_developer_cloud import AlchemyLanguageV1
After this I am getting error like this:
No module named 'watson_developer_cloud'
I installed Watson Developer cloud using command shell and ANACONDA prompt. This is the command which I used and it installed successfully.
pip install -I watson-developer-cloud==1.0.0
Do I need to configure any thing to avoid this error in my Jupyter Notebook while importing Watson Developer.
There are a few issues here.
1. The install you can use is:
pip install --upgrade watson-developer-cloud
The current version as of writing this answer is 2.0.1, not version 1.0
2. Alchemy no longer exists. You should be using NLU instead. There is sample code contained within the SDK.
from watson_developer_cloud import NaturalLanguageUnderstandingV1
from watson_developer_cloud.natural_language_understanding_v1 import Features, EntitiesOptions, KeywordsOptions
nlu = NaturalLanguageUnderstandingV1(
version='2017-02-27',
username='USERNAME',
password='PASSWORD')
features = Features(entities=EntitiesOptions(), keywords=KeywordsOptions())
response = nlu.analyze(language='en',
text='The goal is not to be perfect by the end, the goal is to be better today. - Simon Sinek',
features=features)
print(response)
You can view the SDK examples here: https://github.com/watson-developer-cloud/python-sdk/blob/master/examples
I tried installing Tensorflow object detection API from this guide:
https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/installation.md
I have installed all the dependencies and when I try to test the run the .py file it throws the "got an unexpected keyword argument 'serialized_options' " as mentioned in the title.
As mentioned by most of the people regarding the downgrading of protobuf protoc version to 3.4, I have tried doing that and my version is 3.4, but still it throws the same error.
Please help.
Update protobuf to last version (3.6.x currently).
Please refer to this github issue-comment if you want know more: https://github.com/protocolbuffers/protobuf/issues/4716#issuecomment-428293527
You can either:
upgrade to Protobuf 3.6.0 or
hand delete the "serialized_options=None," argument from the generated *_pb2.py files.