Giter VIP home page Giter VIP logo

pyhackernews's People

Contributors

akun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pyhackernews's Issues

默认没装mysql的情况下会报错EnvironmentError: mysql_config not found

Downloading/unpacking MySQL-python==1.2.5 (from -r requirements/prod.txt (line 3))
  Downloading MySQL-python-1.2.5.zip (108Kb): 108Kb downloaded
  Running setup.py egg_info for package MySQL-python
    sh: 1: mysql_config: not found
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File "/opt/PyHackerNews/venv/build/MySQL-python/setup.py", line 17, in <module>
        metadata, options = get_config()
      File "setup_posix.py", line 43, in get_config
        libs = mysql_config("libs_r")
      File "setup_posix.py", line 25, in mysql_config
        raise EnvironmentError("%s not found" % (mysql_config.path,))
    EnvironmentError: mysql_config not found
    Complete output from command python setup.py egg_info:
    sh: 1: mysql_config: not found

Traceback (most recent call last):

  File "<string>", line 14, in <module>

  File "/opt/PyHackerNews/venv/build/MySQL-python/setup.py", line 17, in <module>

    metadata, options = get_config()

  File "setup_posix.py", line 43, in get_config

    libs = mysql_config("libs_r")

  File "setup_posix.py", line 25, in mysql_config

    raise EnvironmentError("%s not found" % (mysql_config.path,))

EnvironmentError: mysql_config not found

----------------------------------------

是否把libmysqlclient-dev也加入到requirements
然后我在项目里似乎没找到使用MySQLdb的文件?

无法通过make lint

执行make的时候无法通过make lint

make lint
make[1]: Entering directory '/opt/www/hackernews'
pylint --rcfile=.pylintrc --load-plugins pylint_django -E src/pyhn



************* Module pyhn.apps.news.tests.test_comment
src/pyhn/apps/news/tests/test_comment.py:36: [E1101(no-member), AnonymousCommentTestCase.test_comment_post_failed] Instance of 'HttpResponse' has no 'url' member
src/pyhn/apps/news/tests/test_comment.py:36: [E1101(no-member), AnonymousCommentTestCase.test_comment_post_failed] Instance of 'HttpResponseServerError' has no 'url' member
src/pyhn/apps/news/tests/test_comment.py:36: [E1101(no-member), AnonymousCommentTestCase.test_comment_post_failed] Instance of 'HttpResponseNotFound' has no 'url' member
Makefile:23: recipe for target 'lint' failed
make[1]: *** [lint] Error 2
make[1]: Leaving directory '/opt/www/hackernews'
Makefile:7: recipe for target 'all' failed
make: *** [all] Error 2

No module named local

安装完毕后执行make run报错

(venv)root@li704-112:/opt/www/hackernews# make run
cd src && python manage.py runserver 0.0.0.0:
Traceback (most recent call last):
  File "manage.py", line 13, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/www/hackernews/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/opt/www/hackernews/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/www/hackernews/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
    commands = get_commands()
  File "/opt/www/hackernews/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 107, in get_commands
    apps = settings.INSTALLED_APPS
  File "/opt/www/hackernews/venv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 54, in __getattr__
    self._setup(name)
  File "/opt/www/hackernews/venv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 49, in _setup
    self._wrapped = Settings(settings_module)
  File "/opt/www/hackernews/venv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 132, in __init__
    % (self.SETTINGS_MODULE, e)
ImportError: Could not import settings 'pyhn.settings.local' (Is it on sys.path? Is there an import error in the settings file?): No module named local
Makefile:45: recipe for target 'run' failed

安装过程错误

vim src/pyhn/settings/local.py
python src/manage.py syncdb --noinput
python src/manage.py collectstatic --noinput

后两行命令会被输入到 vim 中

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.