Comments (13)
Hi @gdg87,
I've just tried it and it seems to work. Could you give more information about the code that produced this error?
from pyarango.
Hi,
this is my function that produce this error
`postsCollection = db["posts"]
commentsCollection = db["comments"]
postlinksCollection = db["postlinks"]
posts = postsCollection.fetchByExample({'PostTypeId' : 2}, batchSize = 100)
for post in posts:
parent = postsCollection.fetchFirstExample({'Id': post['ParentId']})
if parent:
parentUID = parent[0]['OwnerUserId'];
G.add_edge(parent[0]['OwnerUserId'], post['OwnerUserId'], key='question_answer', weight=8)
commentsParent = commentsCollection.fetchByExample({'PostId': parent[0]['Id']}, batchSize = 20)
for commentParent in commentsParent:
G.add_edge(parent[0]['OwnerUserId'], commentParent['UserId'], key='comment', weight=4)
comments = commentsCollection.fetchByExample({'PostId': post['Id']}, batchSize = 20)
for comment in comments:
G.add_edge(post['OwnerUserId'], comment['UserId'], key='comment', weight=4)
link = postlinksCollection.fetchFirstExample({'PostId': post['Id']})
if link:
linked = postsCollection.fetchFirstExample({'Id': link[0]['RelatedPostId']})
G.add_edge(post['Id'], linked[0]['OwnerUserId'], key='link', weight=2)
return G`
from pyarango.
What happens if you do:
for post in posts:
print post
from pyarango.
Print the object until it give the error
from pyarango.
I am not able able to reproduce the error. Can you tell me how many examples it prints before dying?
from pyarango.
If the batchSize is 100 it dies at 100 example, but if the batchSize is smaller it prints more examples. The number of examples printed is variable.
from pyarango.
If you at the look test here, it creates 100 users, as asks for them all with a batch size of 1 and tries to append 105 of them. Everything seems ok when I run it. Have you tried to update to the last github version? Can you run the test?
from pyarango.
The test works, but I have this error only when the number of documents in the collection is higher then 20000. Using collection with a limited number of documents I do not have any erorr.
from pyarango.
I have just tried it and it works for 20000 users.
Could you give me the contents of posts.request.status_code, and also posts.rawResults?
from pyarango.
Using posts.request.status_code or posts.rawResults it give me the above error with any batch size. Try to increase the number of users in your test I think that the limit number to reproduce the error depends also on the pc where the script run.
from pyarango.
I'm sorry request was not saved as an attribute. I've changed that now, but rawResults should have worked. I've tried it with 100,000 documents. The issue might not be directly related to pyArango, have you tried to update ArangoDB?
from pyarango.
Ok, I make a test removing the internal part of the for and it works. Maybe the problem is related with multiple query in a for, however I will change my code to avoid this error moving the other query out of the for.
from pyarango.
Ok, cool!
from pyarango.
Related Issues (20)
- Is single-write supposed to be slower compared to bulkSave?
- How do to use connection pooling in pyArango? HOT 2
- Bug: 'StandardCollection' object has no attribute 'result'
- Why keep support to python 2? HOT 2
- Sorry to have posted a wrong question!
- Not able to establish connection with ArangoDb Server "No connection adapters were found "
- bulkImport_json errors due to encoding issue: Use body.encode('utf-8') if you want to send it encoded in UTF-8.
- Problem creating graph from existing edge collections HOT 2
- Is there a way to disconnect the connection established from my Python COde HOT 1
- Is there a way to disconnect the connection established from Python
- Connection object should be deleted to allow dropping of collection.
- Collection.action always has an empty request body
- Provide pre-built wheel
- ValueError: 'verify' argument can only be of type: bool, CA_Certificate or str HOT 1
- `dict` of a `Document` instance leads to `TypeError`
- ModuleNotFoundError: No module named 'sample'
- Add support for views
- how to build inverted index
- Pyarango Persistent Connection Hangs for Up to 15 mins HOT 3
- Incompatibility with python3 in String validator.
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 pyarango.