Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Luca Guariento
    @lguariento
    yes
    Andrew Hankinson
    @ahankinson
    and if you print "instance.source_id" just before it tries to execute the query?
    in your source model
    Luca Guariento
    @lguariento
    (bc_env)bsa-hatii:BassCulture BassCulture$ ./manage.py import_metadata /Users/BassCulture/Desktop/Metadata.csv
    {'verbosity': 1, 'settings': None, 'traceback': False, 'location': '/Users/BassCulture/Desktop/Metadata.csv', 'pythonpath': None, 'no_color': False}
    Cleaning source table
    Creating source BC-W.B1
    BC-W.B1
    Traceback (most recent call last):
    File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
    File "/srv/webapps/BassCulture/bcenv/lib/python3.4/site-packages/django/core/management/_init.py", line 338, in execute_from_command_line
    utility.execute()
    File "/srv/webapps/BassCulture/bcenv/lib/python3.4/site-packages/django/core/management/_init.py", line 330, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/django/core/management/base.py", line 393, in run_from_argv
    self.execute(args, **cmd_options)
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/django/core/management/base.py", line 444, in execute
    output = self.handle(
    args, options)
    File "/srv/webapps/BassCulture/bassculture/management/commands/import_metadata.py", line 24, in handle
    self.create_source(row)
    File "/srv/webapps/BassCulture/bassculture/management/commands/import_metadata.py", line 63, in create_source
    s.save()
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/django/db/models/base.py", line 710, in save
    force_update=force_update, update_fields=update_fields)
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/django/db/models/base.py", line 747, in save_base
    update_fields=update_fields, raw=raw, using=using)
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/django/dispatch/dispatcher.py", line 201, in send
    response = receiver(signal=self, sender=sender,
    named)
    File "/srv/webapps/BassCulture/bassculture/models/source.py", line 51, in solr_index
    record = si.query(type="source", source_id="{0}".format(instance.source_id)
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/scorched/search.py", line 579, in execute
    ret = self.interface.search(**self.options())
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/scorched/connection.py", line 378, in search
    self.conn.select(params), self._datefields)
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/scorched/connection.py", line 188, in select
    raise scorched.exc.SolrError(response)
    scorched.exc.SolrError: <Response [404]>
    not sure I'm doing it right, I just added print(instance.source_id)
    it looks as though it doesn't print anything...
    Andrew Hankinson
    @ahankinson
    I'm guessing it printed BC-W.B1
    what happens if you change the SOLR_SERVER to just 'http://localhost:8983/'
    Luca Guariento
    @lguariento
    no that's the print("Creating source " + row['source_id']) in the import_metadata
    oh
    you're right
    (y)
    still 404
    Andrew Hankinson
    @ahankinson
    and what happens if you load 'http://localhost:8983' in your browser?
    Luca Guariento
    @lguariento
    it redirects to /solr
    Andrew Hankinson
    @ahankinson
    are you getting a 'no cores available' on the left?
    in the web interface?
    Luca Guariento
    @lguariento
    no, I have my HMS core loaded
    if I hardcode the address of solr, it connects...
    buh
    Andrew Hankinson
    @ahankinson
    what, exactly, do you put?
    what do you mean it 'connects'?
    as in, it works?
    Luca Guariento
    @lguariento
    si = scorched.SolrInterface("localhost:8983/solr/")
    Andrew Hankinson
    @ahankinson
    but that's not the same address
    Luca Guariento
    @lguariento
    well, it gives me another error (the 'no network adapters' one)
    Andrew Hankinson
    @ahankinson
    yes
    because you're omitting the 'http'
    Luca Guariento
    @lguariento
    true
    Andrew Hankinson
    @ahankinson
    if you add that you will get the exact same error
    Luca Guariento
    @lguariento
    ok, that's solved - true
    I've put the localhost:8983/solr in the SOLR_SERVER
    and now it's fine
    I mean, the module gets it from settings.
    Andrew Hankinson
    @ahankinson
    define "fine"?
    I don't understand
    do you mean that it works and imports the data?
    Luca Guariento
    @lguariento
    the module gets the setting
    Andrew Hankinson
    @ahankinson
    or do you mean you're getting another error?
    Luca Guariento
    @lguariento
    and when I run the import_metadata it connects to solr
    Andrew Hankinson
    @ahankinson
    how do you know?
    Luca Guariento
    @lguariento
    I'm getting the 'no adapters' error
    Andrew Hankinson
    @ahankinson
    then that's not 'fine'
    Luca Guariento
    @lguariento
    my wild wild guess is that if I'd have a 'remote' address with a 'nice' http it would connect.... am I wrong?
    (fine: I meant: one problem solved)
    Andrew Hankinson
    @ahankinson
    it's connecting when it gets the 404 too
    Luca Guariento
    @lguariento
    ok
    Andrew Hankinson
    @ahankinson
    in fact, it's probably getting further
    404 comes from the server