N00b having Trouble with commands
jakethesnakeroberts opened this issue · 3 comments
jakethesnakeroberts commented
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 commented
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 commented
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 commented
thanks for the clue @sopoforic , should be fixed now!