Py-StackExchange icon indicating copy to clipboard operation
Py-StackExchange copied to clipboard

Object_explorer is not working

Open braiangama opened this issue 9 years ago • 4 comments

Hello,

I'm starting with the Py-StackExchange and when I run the object_explorer it shows me 256 site names from the StackExchange and after returns me this error:

Traceback (most recent call last): File "object_explorer.py", line 162, in site, site_def = choose_site() File "object_explorer.py", line 34, in choose_site print('%d) %s' % (i, site.name)) File "C:\Python27\lib\encodings\cp850.py", line 12, in encode return codecs.charmap_encode(input,errors,encoding_map) UnicodeEncodeError: 'charmap' codec can't encode characters in position 5-16: character maps to

How can I proceed?

I'm running it on Microsoft Windows 8.1

braiangama avatar Oct 04 '16 18:10 braiangama

Same issue here.

peterbabinec avatar Nov 04 '16 09:11 peterbabinec

Another issue (maybe not related) on a Mac and Python 3+

Using the example code for object_explorer the output does not match the example

Should it not show Users object when dir after Users ?, output below:-

... Site ID: 1 <------ Use function names you would when using the Site, etc. objects. return: Move back up an object. exit: Quits. dir: Shows meaningful methods and properties on the current object. dir_: Same as dir, but includes *all_ methods and properties. code: Show the code you'd need to get to where you are now. ! before a non-function means "explore anyway." a prompt ending in []> means the current item is a list. Stack Overflow> user <------ <bound method Site.user of <stackexchange.site.Site object at 0x103d8bb00>> Stack Overflow> dir ['all_badges', 'all_nontag_badges', 'all_tag_badges', 'all_tags', 'answer', 'answers', 'api_version', 'app_key', 'badge', 'badge_recipients', 'badges', 'be_inclusive', 'build', 'build_from_snippet', 'cache_options', 'check_filter', 'comment', 'comments', 'domain', 'error', 'force_http', 'impose_throttling', 'include_body', 'include_comments', 'info', 'moderators', 'moderators_elected', 'privileges', 'question', 'questions', 'recent_questions', 'revision', 'revisions', 'root_domain', 'search', 'search_advanced', 'similar', 'stats', 'tag', 'tag_related', 'tag_synonyms', 'tag_wiki', 'tags', 'throttle_stop', 'user', 'users', 'users_by_name', 'vectorise'] Stack Overflow>

goldiiman avatar Nov 06 '16 16:11 goldiiman

@goldiiman , I was able to go about this by providing a API key, this might seem naive but do give it a try.

kumiDa avatar May 18 '17 06:05 kumiDa

@goldiiman same issue. After providing an API key, selecting StackOverflow, and trying to get a user, I am not prompted to input a nid(as shown on the wiki). It simply stats that user is a method.

zlang19 avatar Jun 21 '18 03:06 zlang19