Comments (13)
Please provide a complete example (while omitting your credentials) and a complete traceback. Nevertheless, this seems to be a known issue which we cannot do much about as far as I am aware (see #182).
from pycaching.
Not completely correct, it returns a generator of Cache
objects and uses advanced_search
internally:
>>> import pycaching
>>> gc = pycaching.login(..., ...)
>>> gc.search(point=pycaching.Point(48, 12), limit=100)
<generator object Geocaching.advanced_search at 0x7f02c1f45bd0>
>>> list(gc.search(point=pycaching.Point(48, 12), limit=10))
[<pycaching.cache.Cache object at 0x7f02c2efece0>, <pycaching.cache.Cache object at 0x7f02c20abb20>, <pycaching.cache.Cache object at 0x7f02c20abfd0>, <pycaching.cache.Cache object at 0x7f02c1d02f80>, <pycaching.cache.Cache object at 0x7f02c1d02d70>, <pycaching.cache.Cache object at 0x7f02c1d02ef0>, <pycaching.cache.Cache object at 0x7f02c1d02ce0>, <pycaching.cache.Cache object at 0x7f02c1d03040>, <pycaching.cache.Cache object at 0x7f02c1d02dd0>, <pycaching.cache.Cache object at 0x7f02c1d02c80>]
from pycaching.
It is the same error as #182. If this indeed cannot be fixed, is there a workaround, such as a different search function to use instead of this one?
from pycaching.
No: While there are three other search functions (see the API docs), they all internally rely on the same base method advanced_search
as does the regular search
method.
from pycaching.
The problem you mentioned was fixed about half a year ago in #206.
If you want to use the fixed version of pycaching
, you can install it with the following command:
pip install https://github.com/tomasbedrich/pycaching/archive/master.zip
from pycaching.
pip install https://github.com/tomasbedrich/pycaching/archive/master.zip
Isnβt it released?
from pycaching.
No, the latest version is 1.5 years old.
from pycaching.
Shame on me. Released now.
from pycaching.
Great! Got it working! Thanks for pushing the new release!
One final problem; the documentation states that the user can input 6 arguments into the geocaching.search()
function, but I get a code error displaying TypeError: Geocaching.search() takes from 2 to 3 positional arguments but 8 were given
when a attempt to put more then 2 arguments. Here is the code: geocaching.search(pycaching.Point.from_string(user_input),100,pycaching.geocaching.SortOrder.distance,False,100,pycaching.Point.from_string(user_input),None)
from pycaching.
There is a *
in-between, id est everything besides point
and limit
needs to use keywords. Additionally, you have seven parameters instead of six ones.
from pycaching.
I can't find anywhere in the documentation that described how I am supposed to get the cache objects that advanced_search() returns. How do I do this?
from pycaching.
What exactly is your issue with the returned objects? advanced_search
will return you Cache
objects directly, while there might be None
entries in-between if there have been too many requests - this should be rather clear from reading the type hints which are shown in your above screenshot as well. (Depending on your limit, you might run into an infinite loop and thus the search never terminates unless you stop iterating, but your above example uses a limit of 100 which should not have this issue.)
from pycaching.
When using the search()
function, it returns a advanced_search()
object. Should this be happening? If so, how do I access the caches from the advanced_search()
function?
from pycaching.
Related Issues (20)
- pycaching.cache.Cache._from_print_page not working with non-English languages HOT 1
- get_cache(guid=) raising page load error HOT 1
- No attribute for getting the name of a cache HOT 1
- I'm not sure how to translate a cache.Type value into a str. HOT 1
- Access Geocaching Messaging Feature HOT 1
- What type does cache.load_logbook() return and how do I turn it into a dict? HOT 3
- No current way to get the raw HTML cache description HOT 5
- Get all the images from a cache's image gallery
- Delete or Edit Log Posts HOT 1
- advanced_search() returning unexpected results when searching for a string HOT 9
- Document release process
- Enable squash merging? HOT 1
- Posting a log isn't possible anymore - maybe related to recent Groudspeak log page change HOT 10
- Unexpected results when searching caches from a point HOT 5
- Docs build is failing HOT 5
- Archive Log Type Can Be 5 or 6 HOT 1
- Cannot process caches with unescaped `&#` in the cache name HOT 5
- Incorrect Point.from_string() parsing
- search always brings me to south america 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 pycaching.