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

Installation notes #273

Closed
vineetbansal opened this issue Mar 8, 2019 · 0 comments
Closed

Installation notes #273

vineetbansal opened this issue Mar 8, 2019 · 0 comments
Labels

Comments

@vineetbansal
Copy link
Contributor

vineetbansal commented Mar 8, 2019

Hello,

I've been able to install/run the ppa application on Windows, but at certain points in the process had to work some installation issues that may be worth your attention. Sorry for dumping all this in one thread - some of these are not really 'issues' but just notes, some may be common knowledge to people working with django (and thus weren't mentioned in the README) but weren't obvious to me, and finally some may be specific to my case.

  • the README explicitly mentions Python 3.5 but everything worked fine for my Python 3.6.3 virtuenenv (except for one minor issue at the end of this list).
  • I had to make up a secret key in local_settings.py before running any manage command.
  • The logging mechanism in local_settings.py expects a handler called console but this is missing in the handlers section. I added something like:
        'console': {
            'class': 'logging.StreamHandler',
            'level': 'DEBUG',
            'stream': 'ext://sys.stdout'
        }
  • The README makes it seem like one can choose any names for cores/collections (..using the core/collection names for development and testing that you configured in local settings..) but really one has no choice in the matter, since ppa/archive/solr.py is hardwired to expect default as a key. The tests are wired to expect the test key (not very sure of this though). The example using SOLR_CORE and SOLR_TEST_CORE may be confusing here too.

  • On running manage.py solr_schema, I found that the code tries to make a connection to

http://127.0.0.1:8983/solr/ppa/schema/fieldtypes?wt=json&...

i.e. using the collection key value in the URL (ppa). However, on my SOLR installation (version 7.7.0), this caused a 404, and the correct URL seems to be:

http://127.0.0.1:8983/solr/default/schema/fieldtypes?wt=json&...

i.e. it uses the core name in the URL.
This was also a problem when running the unit tests later. I got around these by simply making sure the collection name matched the core name for both keys in SOLR_CONNECTIONS

    'default': {
        'COLLECTION': 'default',  # changed from 'ppa'
    ...
  • For the npm stuff, I had to do a npm install gulp before anything else.

  • At some point, I remember manage.py migrate giving me message like Your models have changes that are not yet reflected in a migration, and so won't be applied. Run 'manage.py makemigrations' to make new migrations ..., so I did just that to keep it happy before running migrate.

  • The test_connection_error test in TestSolrSchemaCommand tries to create a connection to port 191918984 which causes a ValueError deep inside urllib, which the solr library never catches as a ConnectionError, and thus the Command class doesn't catch it either, causing the test to error out. This seems to be a change in urllib.parse for Python>=3.6 though.

  • I'm getting a few more test failures, but I think they're my environment issues (or might be related to my using Python 3.6).

After these few minor tweaks, I'm able to run the site locally on Windows which is great! Usually Windows makes it way more painful than this.

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

No branches or pull requests

2 participants