Comments (5)
Update: I decided everything was ready to go and started sending docs to the sentiment service. About 650 in, 500 response codes started occurring (sorry, no more detail than that). Things obviously got stuck at some point and so I Ctrl-C the application.
I was logged into the developer portal at the same time so I could monitor what was going at certain points. I Ctrl-Ced everything when the browser page would not refresh / timed out - I got a Gateway Timeout page once. Now it seems I've perhaps triggered some firewall because I can not get any response from the UI (have a blank webpage).
So I will stop. Sorry for breaking something :(
Update: I have processed a lot more documents now and no problems. As far as I can tell, it seems the 500 errors occurred after making a lot of requests with one client. But that may be a incorrect hypothesis. I broke the task up into multiple simultaneous Dask workers/clients and subsets of the whole set of documents [200 - 300 at a time] and have had no more problems.
from nlapi-python.
Here is a stack trace I got when using version 2.1.2.
File "/Volumes/Phil/projects/research/holistic/src/holistic/features/featset/expertai.py", line 89, in make_features
output = self.client.full_analysis(
File "/Volumes/Phil/projects/research/holistic/venv/lib/python3.8/site-packages/expertai/nlapi/cloud/client.py", line 89, in full_analysis
response = self.response_class(response=request.send())
File "/Volumes/Phil/projects/research/holistic/venv/lib/python3.8/site-packages/expertai/nlapi/cloud/request.py", line 52, in send
http_method, req_parameters = self.setup_raw_request()
File "/Volumes/Phil/projects/research/holistic/venv/lib/python3.8/site-packages/expertai/nlapi/cloud/request.py", line 62, in setup_raw_request
req_parameters = {"url": self.url, "headers": self.headers}
File "/Volumes/Phil/projects/research/holistic/venv/lib/python3.8/site-packages/expertai/nlapi/cloud/request.py", line 34, in headers
header = ExpertAiAuth().header
File "/Volumes/Phil/projects/research/holistic/venv/lib/python3.8/site-packages/expertai/nlapi/common/authentication.py", line 26, in header
value = constants.AUTH_HEADER_VALUE.format(self.fetch_token_value())
File "/Volumes/Phil/projects/research/holistic/venv/lib/python3.8/site-packages/expertai/nlapi/common/authentication.py", line 57, in fetch_token_value
raise ExpertAiRequestError(
expertai.nlapi.common.errors.ExpertAiRequestError: Failed to fetch the Bearer Token. Error: 500-Internal Server Error
If I immediately uninstall 2.1.2, reinstall 2.1.0 and then immediately run my code, everything works fine. If you can give me an idea where to look, I'd be happy to track this down for you - at least what I can from my side. I am only making 1 request at the moment - not a lot like I previously have said.
from nlapi-python.
Hi Doug,
there was a problem in deploying v2.1.2, you should retrieve v2.1.3 that fix the problem.
This should fix the 500 problem.
Thanks
Marco
from nlapi-python.
Hi Marco,
2.1.3 works perfectly. Thanks for being so responsive. FYI, the sentiment analysis looks to be more accurate than any of the other sentiment analysis libraries I have (afinn, pattern.en, SentiStrength, NLTK...) for a subset of the documents I have (the ones with negative polarity). I have to figure out why, but I'm not complaining.
Doug
from nlapi-python.
Hi Doug,
thank you for your patience and for your feedback.
Marco
from nlapi-python.
Related Issues (14)
- Issues with importing expertai on Ubuntu 18.04 HOT 1
- expertai.nlapi.common.errors.ExpertAiRequestError: Response status code: 500 - Python SDK HOT 4
- Error calling Detector API HOT 2
- Endpoint for sending multiple requests HOT 1
- No option to specify proxies in the get request. HOT 3
- Cannot send two requests withot restarting kernel HOT 16
- binascii.Error: Incorrect padding HOT 7
- HTTP Error 429 HOT 6
- HTTP Status Code 500 HOT 1
- topics with id of 0 HOT 5
- No topics for one document HOT 2
- Way to make custom model HOT 1
- Documentation wrong for linguistic analysis function HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nlapi-python.