Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

N00b having Trouble with commands #15

Closed
jakethesnakeroberts opened this issue Jan 10, 2021 · 3 comments
Closed

N00b having Trouble with commands #15

jakethesnakeroberts opened this issue Jan 10, 2021 · 3 comments

Comments

@jakethesnakeroberts
Copy link

Hey - I'm not sure how to create the initial secrets.py file. Could you please update the readme with the exact commands I should be using to export the data?

Thanks!

@ieremies
Copy link

Did you manage to get it working? I created a file .py and defined those parameters as variables and got this:

[DEBUG prawcore 2021-07-15 09:14:51,345 sessions.py:119] Data: None
[DEBUG prawcore 2021-07-15 09:14:51,345 sessions.py:120] Params: {'raw_json': 1}
[DEBUG prawcore 2021-07-15 09:14:52,256 sessions.py:195] Response: 200 (1582 bytes)
Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/ieremies/.local/lib/python3.9/site-packages/rexport/export.py", line 141, in <module>
    main()
  File "/home/ieremies/.local/lib/python3.9/site-packages/rexport/export.py", line 117, in main
    j = get_json(**params)
  File "/home/ieremies/.local/lib/python3.9/site-packages/rexport/export.py", line 102, in get_json
    return Exporter(**params).export_json()
  File "/home/ieremies/.local/lib/python3.9/site-packages/rexport/export.py", line 84, in export_json
    profile     =self.extract_profile(),
  File "/home/ieremies/.local/lib/python3.9/site-packages/rexport/export.py", line 80, in extract_profile
    return jsonify(self._me)
  File "/home/ieremies/.local/lib/python3.9/site-packages/rexport/export.py", line 57, in jsonify
    return jsonify(vars(d))
  File "/home/ieremies/.local/lib/python3.9/site-packages/rexport/export.py", line 45, in jsonify
    return {k: jsonify(v) for k, v in d.items() if k not in IGNORED_KEYS}
  File "/home/ieremies/.local/lib/python3.9/site-packages/rexport/export.py", line 45, in <dictcomp>
    return {k: jsonify(v) for k, v in d.items() if k not in IGNORED_KEYS}
  File "/home/ieremies/.local/lib/python3.9/site-packages/rexport/export.py", line 57, in jsonify
    return jsonify(vars(d))
  File "/home/ieremies/.local/lib/python3.9/site-packages/rexport/export.py", line 45, in jsonify
    return {k: jsonify(v) for k, v in d.items() if k not in IGNORED_KEYS}
  File "/home/ieremies/.local/lib/python3.9/site-packages/rexport/export.py", line 45, in <dictcomp>
    return {k: jsonify(v) for k, v in d.items() if k not in IGNORED_KEYS}
  File "/home/ieremies/.local/lib/python3.9/site-packages/rexport/export.py", line 62, in jsonify
    raise RuntimeError(f"Unexpected type: {type(d)}")
RuntimeError: Unexpected type: <class 'function'>```

@sopoforic
Copy link

I've also been getting this error for the past few weeks. It is caused, I think, by praw v7.3.0, so you can fix it for the moment by installing v7.2.0 (e.g. pip3 install --user praw==7.2.0).

To fix it in rexport, it will be necessary to handle the UserSubreddit type added in 7.3.0 at me().subreddit.

@karlicoss
Copy link
Owner

thanks for the clue @sopoforic , should be fixed now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants