menorki / python-calais

Automatically exported from code.google.com/p/python-calais
0 stars 0 forks source link

Value Error #20

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. calais = Calais(API_KEY, submitter="python-calais demo")
2. result = calais.analyze("George Bush was the President of the United States
of America until 2009.  Barack Obama is the new President of the United States 
now.")

(Basically while trying out the example the example)

What is the expected output? What do you see instead?
(Expected output is as shown in the example)
Calais Request ID: 0bfa1f51-4dec-4a82-aba6-a9f8243a94fd
Title:
Language: English
Extractions:
        4 entities
        1 topics
        2 relations
>>> result.print_topics()
Politics
>>> result.print_entities()
Person: Barack Obama (0.29)
Country: United States of America (0.43)
Person: George Bush (0.43)
Country: United States (0.29)
>>> result.print_relations()
PersonPoliticalPast
        person:George Bush
        position:President
PersonPolitical
        person:Barack Obama
        position:President of the United States

What version of the product are you using? On what operating system?
Version:2.7.8 |Anaconda 2.1.0 (32-bit)| (default, Jul  2 2014, 15:13:35) [MSC 
v.1500 32 bit (Intel)]
OS: Windows 7 Pro, 64 bit

Please provide any additional information below.

Original issue reported on code.google.com by siddhart...@quantiphi.com on 4 Jul 2015 at 6:12

GoogleCodeExporter commented 9 years ago
Sorry I forgot to mention the error:

  File "<ipython-input-26-acf787c29bf4>", line 1, in <module>
    result = calais.analyze("George Bush was the President of the United State of America until 2009.  Barack Obama is the new President of the United States now.")

  File "<ipython-input-20-b00aaf024658>", line 59, in analyze
    return CalaisResponse(self.rest_POST(content))

  File "<ipython-input-20-b00aaf024658>", line 98, in __init__
    raise ValueError(raw_result)

ValueError: Invalid request format - the request has missing or invalid 
parameters

Original comment by siddhart...@quantiphi.com on 4 Jul 2015 at 6:14