Closed coilysiren closed 6 years ago
You can also change `from helpers import blahblah' to 'from pytumblr.helpers import blahblah'
Alternatively
pip install https://github.com/dianakhuang/pytumblr/archive/diana/python-3-support.zip
None of these suggested solutions worked for me.
I am using Python 3.60 and get the following error when I try to run the code below in virtual environment:
File "d:\development_python360\venv_tumblr\lib\site-packages\pytumblr__init__.py", line 1, in
from helpers import validate_params, validate_blogname ModuleNotFoundError: No module named 'helpers'
import pytumblr
client = pytumblr.TumblrRestClient(
"<consumer_key>",
"<consumer_secret>",
"<oauth_token>",
"<oauth_secret>",
)
client.info() # Grabs the current user information
@jerusalemprogrammer The error you get suggests you are still using the default pytumblr branch. Make sure you use the pip from your development environment and not the system pip. I successfully installed it on Python 3.6.1 last week using the python-3-support branch mentioned in the comments above.
I don't know what you mean by default pytumblr branch...
I went to Tumblr API and found the Python that pointed me to the following: https://github.com/tumblr/pytumblr
I then tried to execute the code to begin connecting to Tumblr API, but received errors and then googled those errors and landed to this page: https://github.com/tumblr/pytumblr/issues/77
I pip installed within my virtual environment and not my system python pip.
The suggested solutions didn't work.
JerusalemProgrammer.com JerusalemProgrammers.com JerusalemProgramming.com
On Thu, Jun 1, 2017 at 9:44 PM, Arlena Derksen notifications@github.com wrote:
@jerusalemprogrammer https://github.com/jerusalemprogrammer The error you get suggests you are still using the default pytumblr branch. Make sure you use the pip from your development environment and not the system pip. I successfully installed it on Python 3.6.1 last week using the python-3-support branch mentioned in the comments above.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tumblr/pytumblr/issues/77#issuecomment-305583837, or mute the thread https://github.com/notifications/unsubscribe-auth/AJo421Nq2DcYT4Mz0LWAnFoAApbDQBqRks5r_waTgaJpZM4HEe77 .
Experienced the same problem as jerusalemprogrammer.
I tried the solutions proposed by : lynnco Ph0enix0 romsson I don t really understand boisei0 solution so didn t try it
lynnco & romsson solutions displays the same error
Ph0enix0 solution display a new error : ImportError: No module named 'request' If I apply the same correction again to 'request' it displays : " File "C:\Python\lib\site-packages\pytumblr\request.py", line 37 except RedirectLimit, e: ^ SyntaxError: invalid syntax"
I m not sure, but it looks like this is a Python 3/Python 2 syntax difference that creates the problem right ? I m using python 3.5.3
@Jay-Dai, yes, change the line to except RedirectLimit as e:
if you want to fix this issue. Though, it is likely there are many more syntax errors.
I would suggest @romsson 's solution as it would correct all translation issues. Remove the Python 2 version of pytumblr and use the python3 3rd party version.
I fixed this problem on my Mac by first running
pip unistall pytumblr
and then running
pip install https://github.com/dianakhuang/pytumblr/archive/diana/python-3-support.zip
With the recent changes merged, this should no longer be an issue
https://github.com/menkrep1337/XSSCon/issues/3#issuecomment-536294687
/opt# git clone https://github.com/menkrep1337/XSSCon.git
/opt# cd XSSCon/
/opt/XSSCon# pip3 install -r requirements.txt
/opt/XSSCon# pip install https://github.com/dianakhuang/pytumblr/archive/diana/python-3-support.zip
/opt/XSSCon# pip3 install helpers
/opt/XSSCon# nano /opt/XSSCon/helper.py
-- coding: utf-8 --
/opt/XSSCon# pip3 install pytumblr
/opt/XSSCon# nano xsscon.py
import pytumblr.helpers
/opt/XSSCon# python3 xsscon.py
Is fixed by the Python 3 support pull request
Which, pending it being merged into master, you can install with
Hopefully this will save someone 5 minutes