Coder Social home page Coder Social logo

mrisa's People

Contributors

chand1012 avatar d34d10cc avatar daniel1111 avatar dependabot[bot] avatar dhruv4 avatar doggan avatar guoyunhe avatar kevinnovak avatar mirzazulfan avatar mjr128 avatar phanirithvij avatar phanirithvij2000 avatar vivithemage avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mrisa's Issues

How to get it Working?

I've downloaded the zip file and ran the server and all seems to be okay. But when I paste the localhost url to my browser it gives me a 404. How do I get this going?

Getting a 500 Internal Server Error

Hi,

I've got the server successfully running on http://0.0.0.0:5000/ but when I try making a POST request, I get the following error:

<title>500 Internal Server Error</title>

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

I just tried the sample request in the docs to try it out.

Any suggestions on how to get it working? Thanks!

What version of Python do you need to run this?

I coudln't tell from the README what version of Python is required for this. I don't see a virtualenv in the download, and when I tried installing via what the README recommended, I got this error

localhost:mrisa-master davea$ pip install -r requirements.txt
ImportError: No module named site

Empty answer

Always returns an empty dictionary on any request.

{'links': [], 'descriptions': [], 'titles': [], 'similar_images': [], 'best_guess': ''}

Unicode in the json file

I discovered some problems in the json files I created from returned data using a modified form of the 'client.py' file.
All json files begin with the letter 'b' and a single quote. Each file ends with a single quote. In between are several unicode characters and escaped characters. Examples are:
'
\
u\00a0
u\00d7
If the iinitial b and single quote are removed, along with the trailing quote, all '\' become ''
and all escaped apostrophes have the back slash removed, then the file is accepted as a json file.
Question is, can these chartacters be removed easily? I'm only vaguely familiar with python string types
and unicode, ASCII, and byte conversions. I could write a script to remove the examples, but is that all that will ever be ever found?

Client.py - StringIO is deprecated in Python 3 + a suggestion

The following code is from the server script. You may want to add to the client script or do the replacements listed.
I don't know if io works with older python versions, so for dual compatibility, the 'try' code may be better. Unfortunately, there's no 'PyVer' version reconciliation module to treat compatibility issues.
Seems like a 'no brainer'.
CODE
try:
from StringIO import StringIO
except ImportError:
python3 = True
import io as bytesIOModule
END CODE

Replace :
storage = StrinIO.StrinIO()
with :
storage = io.BytesIO()
and
import io instead of StringIO
additionally
add parentheses for print statement.
The suggestion:
if possible, add the section on Google's return page, entitlesd "Pages that include matching images."
This would create the possibility of searching for larger format images, e.x. 2048x1024.

ConnectionRefusedError

I receive a ConnectionRefusedError when trying to send a POST request to the server running locally on Windows.

localhost/127.0.0.1 useage?

Not so much an issue as a question/request.
I've gotten the software running after some work.
I had to use io.BytesIO() instead of io.StringIO().
I'm using Windows 10 Pro x64 with the Debian Strtetch Linux subsystem installed with curl added on.
Everythings working, but I need to use images in my Apache htdocs directory, or some other local path.
I tried Dropbox, but direct links to files is not possible.
Any help is appreciated. I'm trying to identify over 2000 works of art extracted from a video file.

Bestguess string is empty after some requests

After around ~140-160 requests Bestguess will be empty for all following requests but if you wait a while (some hours) it works again, i would guess it might be a ratelimit or hidden captcha thing from google.

Please help tell me what I'm doing wrong :) (no results for Tom Hanks)

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I'm running the python example and can see that the server is indeed running and reacting to calls.

I seem to be getting errors related to json:

$ python3 mrisa.py 
Traceback (most recent call last):
  File "/Users/Greg/Projects/Python/GoogleImageSearch/mrisa.py", line 36, in <module>
    print(r.json())
  File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/Cellar/[email protected]/3.9.4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/local/Cellar/[email protected]/3.9.4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/Cellar/[email protected]/3.9.4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I'm using the docker image, although I may be messing that up.

How to troubleshoot?

Can you help me?

Respectfully,
Can you help me?

I have a problem right now, but I can't find the cause
I've tried installing Python 2 and 3 several times, but both get errors

My development environment.

pip freeze
Python 2.7
beautifulsoup4==4.6.0
certifi==2018.4.16
chardet==3.0.4
Click==7.0
Flask==0.12.3
Flask-Cors==3.0.6
idna==2.7
itsdangerous==1.1.0
Jinja2==2.10.3
lxml==4.2.4
MarkupSafe==1.1.1
pycurl==7.19.5
requests==2.20.0
six==1.13.0
urllib3==1.24.3
Werkzeug==0.16.0

At run time,

python example.py

(eun) EUNHYUKui-MacBook-Pro:python eunhyulkim$ python example.py
Traceback (most recent call last):
File "example.py", line 12, in
r = requests.post(url, headers=headers, data=json.dumps(data))
File "/Users/eunhyulkim/opt/anaconda3/envs/eun/lib/python2.7/site-packages/requests/api.py", line 116, in post
return request('post', url, data=data, json=json, **kwargs)
File "/Users/eunhyulkim/opt/anaconda3/envs/eun/lib/python2.7/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/Users/eunhyulkim/opt/anaconda3/envs/eun/lib/python2.7/site-packages/requests/sessions.py", line 524, in request
resp = self.send(prep, **send_kwargs)
File "/Users/eunhyulkim/opt/anaconda3/envs/eun/lib/python2.7/site-packages/requests/sessions.py", line 637, in send
r = adapter.send(request, **kwargs)
File "/Users/eunhyulkim/opt/anaconda3/envs/eun/lib/python2.7/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=5000): Max retries exceeded with url: /search (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x10d52f3d0>: Failed to establish a new connection: [Errno 61] Connection refused',))


At run time, server.py

(eun) EUNHYUKui-MacBook-Pro:src eunhyulkim$ python server.py

  • Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
    127.0.0.1 - - [15/Nov/2019 02:27:01] "GET / HTTP/1.1" 404 -
    127.0.0.1 - - [15/Nov/2019 02:27:06] "GET / HTTP/1.1" 404 -
    127.0.0.1 - - [15/Nov/2019 02:27:07] "GET / HTTP/1.1" 404 -
    127.0.0.1 - - [15/Nov/2019 02:27:51] "GET /search HTTP/1.1" 405 -
    127.0.0.1 - - [15/Nov/2019 02:27:51] "GET /favicon.ico HTTP/1.1" 404 -

and

Not Found
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

getting this error while deploying this to heroku

I'm getting this error
2020-12-23T06:30:41.158536+00:00 app[web.1]: time.sleep(0.1)
2020-12-23T06:30:41.158597+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
2020-12-23T06:30:41.161138+00:00 app[web.1]: self.reap_workers()
2020-12-23T06:30:41.161147+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
2020-12-23T06:30:41.161147+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2020-12-23T06:30:41.161148+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2020-12-23T06:30:41.226305+00:00 heroku[web.1]: Process exited with status 1
2020-12-23T06:30:41.274154+00:00 heroku[web.1]: State changed from starting to crashed
2020-12-23T06:30:41.979806+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=image-c2.herokuapp.com request_id=c3d02f51-1371-410e-bdd4-030d3c511a03 fwd="146.196.32.201" dyno= connect= service= status=503 bytes= protocol=https
2020-12-23T06:30:43.227663+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=image-c2.herokuapp.com request_id=3de42211-6971-482c-a463-7263257ff74f fwd="146.196.32.201" dyno= connect= service= status=503 bytes= protocol=https

if you have already deployed somewhere then let me know

i need help.....

I want to use this tool by all means this program.

Traceback (most recent call last):
File "example1.py", line 13, in
r = requests.post(url, headers=headers, data=json.dumps(data))
File "/Users/eunhyulkim/opt/anaconda3/envs/j16134uk/lib/python3.6/site-packages/requests/api.py", line 116, in post
return request('post', url, data=data, json=json, **kwargs)
File "/Users/eunhyulkim/opt/anaconda3/envs/j16134uk/lib/python3.6/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/Users/eunhyulkim/opt/anaconda3/envs/j16134uk/lib/python3.6/site-packages/requests/sessions.py", line 524, in request
resp = self.send(prep, **send_kwargs)
File "/Users/eunhyulkim/opt/anaconda3/envs/j16134uk/lib/python3.6/site-packages/requests/sessions.py", line 637, in send
r = adapter.send(request, **kwargs)
File "/Users/eunhyulkim/opt/anaconda3/envs/j16134uk/lib/python3.6/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=5000): Max retries exceeded with url: /search (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x104c1fa90>: Failed to establish a new connection: [Errno 61] Connection refused',))
(j16134uk) EUNHYUKui-MacBook-Pro:python eunhyulkim$

Fix the Readme

Fix the readme

change all the links which have phanirithvij/mrisa to vivithemage/mrisa

Problems with the server.py

I am having problems with the Server.py. Every time I am trying to install the requirements,

ERROR: Could not find a version that satisfies the requirement pycurl==7.19.5
ERROR: No matching distribution found for pycurl==7.19.5

and when I want to send a request, it only returns an Error code <Response [500]>.
The Error I get in the Server

Production App Search

Hello, I like your tool!

I see that you are scraping google results to return to the user. From what I understand any app that is doing this with a steady amount of traffic will get shut down pretty quickly by Google.

I haven't been able to find a google api to do the reverse image search for me - have you looked into that at all? I assume yes and you didn't find anything either :)

Google TOS

Does this tool complies with Google's Terms of Service? I'm thinking about using it in a project, looks very nice. Thanks!

Extending the search by using Yandex Image search

Propose Logo

Hi @vivithemage . I'm a graphic designer and an open source enthusiast. I would like to contribute to your project by proposing a logo design. If you have an idea please share with me, it would be better for me. Thanks
mrisa

Best Regard. Mirza Zulfan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.