Code Monkey home page Code Monkey logo

pypatent's People

Contributors

daneads avatar danhydro 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pypatent's Issues

ConnectionError: ('Connection aborted.', BadStatusLine('Error #2000\n',))

My script iterates through a list of patents I want to collect information on.
I initially received this error:
Exception is: ('Connection aborted.', error(10054, ''))
I introduced a time.sleep(2) between calls of pypatent.Search function and remediated this error.

In the 5th iteration of pypatent.Search() , I received this error:
ConnectionError: ('Connection aborted.', BadStatusLine('Error #2000\n',))

Any suggestions on remediating this error? Thank you for your help in advance!

Output recovery

screen shot 2019-03-06 at 2 43 09 pm

I am unable to recover the output of the code:

pypatent.Search('rocket', results_limit=2).as_dataframe()

The function returns the information - but I want to collect it in a separate file. How can I gather the information?

Similarly, I am unable to recover the output of the code:

pypatent.Search('rocket', results_limit=2).as_list()

The function returns a box 'Squeeze Text' which I can open, but it stalls Idle. And, I am unable to right click the box to copy it. Ultimately I am trying to get the return results from the search in a file. Any advice would be appreciated.

Patent limit not in line with UPSTO Search Engine

Hi,

I've been testing pypatent lately and tried to retrieve USPTO patents containing the term "melting point". USPTO is recording 270,000+ of them in their USPTO Patent Full-Text and Image Database. When running pypatent I could only get 2290. I ran this code : pypatent.Search('melting point', results_limit=300000).as_dataframe()

Is there a subtility I did not understand?

Thank you in advance,
Best

AttributeError: 'NoneType' object has no attribute 'find_next'

Error when running your example:

pypatent.Search('TTL/(tennis AND (racquet OR racket))')

AttributeError                            Traceback (most recent call last)
<ipython-input-2-a7c0dc5b3207> in <module>
----> 1 pypatent.Search('TTL/(tennis AND (racquet OR racket))')

/usr/local/lib/python3.7/site-packages/pypatent/__init__.py in __init__(self, string, results_limit, get_patent_details, pn, isd, ttl, abst, aclm, spec, ccl, cpc, cpcl, icl, apn, apd, apt, govt, fmid, parn, rlap, rlfd, prir, prad, pct, ptad, pt3d, pppd, reis, rpaf, afff, afft, in_, ic, is_, icn, aanm, aaci, aast, aaco, aaat, lrep, an, ac, as_, acn, exp, exa, ref, fref, oref, cofc, reex, ptab, sec, ilrn, ilrd, ilpd, ilfd)
    245         r = requests.get(url, headers=Constants.request_header).text
    246         s = BeautifulSoup(r, 'html.parser')
--> 247         total_results = int(s.find(string=re.compile('out of')).find_next().text.strip())
    248 
    249         patents = self.get_patents_from_results_url(url, limit=results_limit)

AttributeError: 'NoneType' object has no attribute 'find_next'

Archived?

Is this repo still connected to USPTO? Probably not, as connections take a ton of time without any response.

Syntax error - prevents search

I setup a virtual env, and ran:

pip install pypatent

But, when I ran:

pypatent.Search('microsoft')

I received the following error:

-bash: syntax error near unexpected token microsoft'`

I am not sure why the search won't work because I don't know what 'unexpected token' means. Indeed, I am not sure how to proceed and would appreciate any advice or suggestions.

Too slow to get data

I run the search with below code, what I want is get 5 items , but it seems like the library still will load the first page (50 items). It's too slow to get data.

import pypatent
from selenium import webdriver

with webdriver.Firefox() as driver:
    conn = pypatent.WebConnection(use_selenium=True, selenium_driver=driver)
    res = pypatent.Search('microsoft', results_limit=5,
                          web_connection=conn)
    print(res)

ConnectionError

In July 2018, these two examples worked well:
pypatent.search("microsoft)
this_patent = patent('http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsearch-adv.htm&r=4&p=1&f=G&l=50&d=PTXT&S1=aaa&OS=aaa&RS=aaa')

November 2018 I am receiving the following error:
ConnectionError: ('Connection aborted.', TimeoutError(10060, 'A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond', None, 10060, None))

Dependent package meet requirements:
Python 3, BeautifulSoup, requests, re

Loved using this package over the summer :) I tried the script from the summer that worked well, but received the same error. Looking for help with connecting to the server. Thank you for your help in advance! Much appreciated! Any suggestions @daneads ?

Description gets truncated

Some patents have very long descriptions and they are being truncated with the typical python ... to indicate that the string has been truncated. I set pandas max_colwidth to None and it had no effect on this behavior. This is causing me to lose a portion of the description. Any thoughts on how to correct this?

error in handling the patent before 1975

Hi, it seems that the pypatent can only handle the patent issued after 1976.
When I want to search the patent issued before 1975, and specify ISD/1/$/1975, it always return error.
I noticed that in the USPTO website, user can manually chooose the after 1976 database or the 1790 full datebase.
Can we manually choose the full database in the pypatent?

Future Development? Patent Client

Hey! This is the only way I can see to contact you, so here I go!

I'm the author and maintainer of patent_client, a library with a similar scope and feature set as your own. patent_client is under active development, and growing, so if you'd like, I'd love to have you contribute, or add a note on your readme pointing to it!

Patent Client Logo

PyPI | GitHub | Docs

Thanks!

Parker

Is it a bug?

When I try to search two key words, i found the result is zero. I checked code, and found it's more reasonale if
searchstring = searchstring.replace(' ', '+') is changed to searchstring = searchstring.replace('-', '+')
I am using the 1.1.0 version and I found whatever 1.2.0 or 1.1.0 will report error after download some patents.

Installing - re error

When installing using "pip install pypatent" the following error occurs:

"Could not find a version that satisfies the requirement re (from pypatent) (from version: )
No matching distribution found for re (from pypatent)"

However, re already comes with python (at least in the Anaconda distribution)

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.