Ask Your Question
0

When installing Askbot, how to solve issue AttributeError: 'NoneType' object has no attribute 'rfind'?

asked 2016-12-31 12:05:44 -0500

oawad79 gravatar image

updated 2017-02-24 11:35:13 -0500

I am trying ti build askbot from the latest clone from github

When running python2.7 setup.py develop

it runs and the I get the following error, what is the issue?

Traceback (most recent call last): File "setup.py", line 122, in <module> (**) - With MySQL you have to use MyISAM data backend, because it's the only one that supports Full Text Search.""" File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup dist.run_commands() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/Users/oawad/.virtualenvs/askbot/lib/python2.7/site-packages/setuptools/command/develop.py", line 36, in run self.install_for_development() File "/Users/oawad/.virtualenvs/askbot/lib/python2.7/site-packages/setuptools/command/develop.py", line 137, in install_for_development self.process_distribution(None, self.dist, not self.no_deps) File "/Users/oawad/.virtualenvs/askbot/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 747, in process_distribution [requirement], self.local_index, self.easy_install File "/Users/oawad/.virtualenvs/askbot/lib/python2.7/site-packages/pkg_resources/__init__.py", line 846, in resolve dist = best[req.key] = env.best_match(req, ws, installer) File "/Users/oawad/.virtualenvs/askbot/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1118, in best_match return self.obtain(req, installer) File "/Users/oawad/.virtualenvs/askbot/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1130, in obtain return installer(requirement) File "/Users/oawad/.virtualenvs/askbot/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 674, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) File "/Users/oawad/.virtualenvs/askbot/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 700, in install_item dists = self.install_eggs(spec, download, tmpdir) File "/Users/oawad/.virtualenvs/askbot/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 881, in install_eggs return self.build_and_install(setup_script, setup_base) File "/Users/oawad/.virtualenvs/askbot/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1120, in build_and_install self.run_setup(setup_script, setup_base, args) File "/Users/oawad/.virtualenvs/askbot/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1106, in run_setup run_setup(setup_script, args) File "/Users/oawad/.virtualenvs/askbot/lib/python2.7/site-packages/setuptools/sandbox.py", line 258, in run_setup raise File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 35, in __exit__ self.gen.throw(type, value, traceback) File "/Users/oawad/.virtualenvs/askbot/lib/python2.7/site-packages/setuptools/sandbox.py", line 198, in setup_context yield File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 35, in __exit__ self.gen.throw(type, value, traceback) File "/Users/oawad/.virtualenvs/askbot/lib/python2.7/site-packages/setuptools/sandbox.py", line 169, in save_modules saved_exc.resume() File "/Users/oawad/.virtualenvs/askbot/lib/python2.7/site-packages/setuptools/sandbox.py", line 144, in resume six.reraise(type, exc, self._tb) File "/Users/oawad/.virtualenvs/askbot/lib/python2 ... (more)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2017-01-04 09:37:15 -0500

Evgeny gravatar image

updated 2017-03-02 14:44:53 -0500

This issue is resolved in the latest releases and in the github repository.

It was caused by a dependency used by another dependency library (Lamson - used for processing of incoming email), where a version of the dependency library was not specified with sufficient detail. From now on these libraries will need to be installed manually by those people who want to support posting responses by email. This feature is not enabled by default.

Before the solution was to run pip install Lamson or pip install django-lamson (the latter is better as it satisfies all dependencies for the "reply by email" feature.

edit flag offensive delete link more

Comments

Thanks it worked. I did this "pip install Lamson"

oawad79 gravatar imageoawad79 ( 2017-01-06 15:00:18 -0500 )edit
1

answered 2017-02-21 14:04:29 -0500

dhill gravatar image

I was getting the AttributeError: 'NoneType' object has no attribute 'rfind' exception above and pip install Lamson fixed it for me. I saved the dependencies before and after and here is the diff:

$ diff --color requirements_before.txt requirements_after.txt 
5a6
> chardet==2.3.0
20a22
> docutils==0.13.1
24a27
> lockfile==0.12.2
25a29
> MarkupSafe==0.23
26a31
> nose==1.3.7
33a39
> python-daemon==2.1.2
edit flag offensive delete link more

Comments

Lamson dependency will be removed in the upcoming release.

Evgeny gravatar imageEvgeny ( 2017-02-22 16:40:41 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-12-31 12:05:44 -0500

Seen: 389 times

Last updated: Mar 02