Hi Joel, Try running the collectstatic command from your packages activated env:
python manage.py collectstatic I think that should fix the problem. Thanks for your patience with this latest upgrade. If that does indeed solve the issue, let me know. Cheers, Alexei Director of Web Development - Farallon Geographics, Inc. - 971.227.3173 On Thu, Nov 19, 2015 at 10:57 PM, Joel Aldor <[email protected]> wrote: > Hi Alexei, > > I did use your modified Python file to run the patch. It was able to > update all 1281 resources on the database. (Sorry I wasn't able to print > the GET/PUT results into an output file) > > However, we found that the search results don't seem to work anymore. When > I type a query, or when I select one of the featured towns on our map, no > results appear. Also, when you edit a resource, the defined values do not > load anymore. They are either blank or they only appear as (). But viewing > the map and the resource reports work fine. > > As far as I can remember, Elasticsearch is always running whenever we load > resources via the forms or .arches upload. We never touched Elastchsearch > at all. Maybe you're right with the index thing? How can we determine if > the resources were not properly indexed? > > You may check our dev server where we applied the patch here: > http://52.34.18.214/search. If you wish to investigate further, please > let me know so I could provide you user access. > > Regards, > > Joel > > On Friday, November 20, 2015 at 4:49:53 AM UTC+8, Alexei Peters wrote: >> >> Hi Joel, >> Looking at the error, it looks like you have a record in the database >> that doesn't exist in the entity index. I'm not sure how the index got >> into that state. It would be nice to do a little more digging. >> Using the entityid in the error, can you find the report for that >> resource. It should be located at: >> http://localhost:8000/reports/974edbec-5664-4151-9018-a23216245478 >> If the report comes up successfully, maybe you can go to the form and >> "re-save" it (which should trigger a re-index of the resource). The form >> should be found at http://localhost:8000/entity/{you'll have to find out >> the entitytypeid from the report}/ >> <http://localhost:9200/entity/HERITAGE_RESOURCE.E18/5a7bf49a-1541-433a-95c9-07e4c98dacd6> >> 974edbec-5664-4151-9018-a23216245478 >> <http://localhost:8000/reports/974edbec-5664-4151-9018-a23216245478> (make >> sure to login). >> >> If you can re-save it, you can try running the patch again. Assuming >> that was the only issue, then you should be set. >> >> If you see the issue again with a different resource, I've attached a new >> patch file that you can run instead. Simply place the file into the >> location where you pip installed arches (and then under >> management/patches). Then run the command referencing the new patch. >> It'll print out a list of resource ids that it can't find in the index. >> Hopefully there aren't many. >> >> I'm still a little perplexed as to how your index got out of sync. Do >> you have any ideas of how that might have happened? Was elasticsearch not >> running while you were adding resources via the ui? Did you happen to >> delete a document from elasticsearch directly? >> >> Please let us know, because if there's a bug I'd like to fix it! >> >> Cheers, >> Alexei >> >> <http://localhost:8000/reports/974edbec-5664-4151-9018-a23216245478>On >> Thursday, November 19, 2015 at 3:39:29 AM UTC-8, Joel Aldor wrote: >> >>> Hello Alexei, >>> >>> Tried to apply the patch but it gives me this error: >>> >>> (ENV2)ubuntu@ip-172-31-28-36:~/Projects/phm2app$ python manage.py >>> install_patch -s upgrade_to_v3_1_1 >>> >>> INSTALLING PYSHP MODULE >>> ----------------------- >>> You are using pip version 7.1.0, however version 7.1.2 is available. >>> You should consider upgrading via the 'pip install --upgrade pip' >>> command. >>> Requirement already satisfied (use --upgrade to upgrade): pyshp in >>> /home/ubuntu/Projects/ENV2/lib/python2.7/site-packages >>> >>> UPDATING ENTITY INDEX >>> --------------------- >>> GET >>> http://localhost:9200/entity/_all/5a7bf49a-1541-433a-95c9-07e4c98dacd6 >>> [status:200 request:0.002s] >>> No handlers could be found for logger "elasticsearch.trace" >>> PUT >>> http://localhost:9200/entity/HERITAGE_RESOURCE.E18/5a7bf49a-1541-433a-95c9-07e4c98dacd6 >>> [status:200 request:0.040s] >>> GET /entity/_all/974edbec-5664-4151-9018-a23216245478 [status:404 >>> request:0.001s] >>> Traceback (most recent call last): >>> File "manage.py", line 28, in <module> >>> execute_from_command_line(sys.argv) >>> File >>> "/home/ubuntu/Projects/ENV2/local/lib/python2.7/site-packages/django/core/management/__init__.py", >>> line 399, in execute_from_command_line >>> utility.execute() >>> File >>> "/home/ubuntu/Projects/ENV2/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 >>> "/home/ubuntu/Projects/ENV2/local/lib/python2.7/site-packages/django/core/management/base.py", >>> line 242, in run_from_argv >>> self.execute(*args, **options.__dict__) >>> File >>> "/home/ubuntu/Projects/ENV2/local/lib/python2.7/site-packages/django/core/management/base.py", >>> line 285, in execute >>> output = self.handle(*args, **options) >>> File >>> "/home/ubuntu/Projects/ENV2/local/lib/python2.7/site-packages/arches/management/commands/install_patch.py", >>> line 39, in handle >>> self.run_patch_file(options['source']) >>> File >>> "/home/ubuntu/Projects/ENV2/local/lib/python2.7/site-packages/arches/management/commands/install_patch.py", >>> line 49, in run_patch_file >>> import_module('arches.management.patches.%s' % module_name) >>> File >>> "/home/ubuntu/Projects/ENV2/local/lib/python2.7/site-packages/django/utils/importlib.py", >>> line 40, in import_module >>> __import__(name) >>> File >>> "/home/ubuntu/Projects/ENV2/local/lib/python2.7/site-packages/arches/management/patches/upgrade_to_v3_1_1.py", >>> line 187, in <module> >>> main() >>> File >>> "/home/ubuntu/Projects/ENV2/local/lib/python2.7/site-packages/arches/management/patches/upgrade_to_v3_1_1.py", >>> line 163, in main >>> indexed_resource = se.search(index='entity', id=resourceid) >>> File >>> "/home/ubuntu/Projects/ENV2/local/lib/python2.7/site-packages/arches/app/search/search.py", >>> line 85, in search >>> return self.es.get(**kwargs) >>> File >>> "/home/ubuntu/Projects/ENV2/local/lib/python2.7/site-packages/elasticsearch/client/utils.py", >>> line 69, in _wrapped >>> return func(*args, params=params, **kwargs) >>> File >>> "/home/ubuntu/Projects/ENV2/local/lib/python2.7/site-packages/elasticsearch/client/__init__.py", >>> line 319, in get >>> params=params) >>> File >>> "/home/ubuntu/Projects/ENV2/local/lib/python2.7/site-packages/elasticsearch/transport.py", >>> line 307, in perform_request >>> status, headers, data = connection.perform_request(method, url, >>> params, body, ignore=ignore, timeout=timeout) >>> File >>> "/home/ubuntu/Projects/ENV2/local/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py", >>> line 89, in perform_request >>> self._raise_error(response.status, raw_data) >>> File >>> "/home/ubuntu/Projects/ENV2/local/lib/python2.7/site-packages/elasticsearch/connection/base.py", >>> line 105, in _raise_error >>> raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, >>> error_message, additional_info) >>> elasticsearch.exceptions.NotFoundError: TransportError(404, >>> u'{"_index":"entity","_type":"_all","_id":"974edbec-5664-4151-9018-a23216245478","found":false}') >>> (ENV2)ubuntu@ip-172-31-28-36:~/Projects/phm2app$ >>> >>> Let me know how to proceed with this. Thank you. >>> >>> Regards, >>> >>> Joel >>> >>> On Saturday, November 14, 2015 at 9:07:26 AM UTC+8, Alexei Peters wrote: >>>> >>>> Hi Everyone, >>>> The Arches team has been busy trying to improve Arches and fix a few >>>> bugs as well. >>>> Below you'll find a listing of all the changes that are included in the >>>> latest releases. >>>> >>>> Users are encouraged to update at their earliest convenience. >>>> Completely re-installing Arches and Arches-HIP is the easiest way to >>>> accomplish this. >>>> >>>> If you can't completely re-install Arches (because you have data in the >>>> system that you want to preserve) then you'll need to upgrade by running >>>> the following commands: >>>> >>>> pip install arches --upgrade >>>> pip install arches-hip --upgrade >>>> >>>> After upgrading you'll need to apply a patch by running this command >>>> from an activated environment (make sure Elasticsearch is running): >>>> >>>> (on linux) --> sudo python manage.py install_patch -s upgrade_to_v3_1_1 >>>> >>>> (on windows) --> python manage.py install_patch -s upgrade_to_v3_1_1 >>>> >>>> >>>> Cheers, >>>> The Arches Team >>>> >>>> Listing of changes in the latest releases: >>>> >>>> Arches 3.1.1 >>>> >>>> - Added permissions change instructions to linux setup script >>>> - Added related resources as csv to export >>>> - Added date type and multipart features to export >>>> - Specified the version of virtualenv to use because of issues >>>> running the arches-app command with more recent versions on linux. >>>> - Added logic to support loading resources with a hard-coded value >>>> type conceptid. >>>> - Added support for specifying a particular value_type for an >>>> export column whenthe entity being exported is of domain type. >>>> Previously >>>> we could only specify a primary and secondary export column - if the >>>> entitytypeid was not an e55. >>>> - Enabled the importer to accept uuid formatted legacy ids as the >>>> entityid for aresource >>>> - Add sort order to default value types. >>>> - Adding graph export tool >>>> - Adding arches json exporter and importer >>>> - Allow users to view related resources without being logged in >>>> - Make sure get_context method always returns a valid concept >>>> - Fix file upload during the save of a .arches file >>>> - Fix JSON output of a concept >>>> - Fix time filter to work with branch list mods >>>> - Fix link color in lists >>>> - Change authentication logic. Add anonymous user. Create read and >>>> edit groups. Add anonymous and admin user to respective groups. Cascade >>>> changes to templates. >>>> - Clean logic in auth method to not have duplicative logic to the >>>> setAnonymous user middleware >>>> - Add unique constraint for legacyoids in concepts.concepts table. >>>> Add more information to entity type has no business table error. >>>> - Fix html error that reverted the map zoom and position updates in >>>> the ui >>>> - Add function to populate concepts legacyoid when adding concepts >>>> from RDM. >>>> - Trigger 'delete' event AFTER removing the branch (this fixes an >>>> issue in the time-filter.js) where a delete wouldn't refresh the search >>>> - Fixed bug that kept numbers from exporting to CSV. >>>> - Fix a few missellings in the docs >>>> - Fix bug where clicking a link to edit a form entry would cause >>>> that entry to disappear and not be entered into the editing section of >>>> the >>>> form, depends on update of knockout library >>>> - Add deprecation decorator, mark user_can_edit context processor >>>> as deprecated >>>> >>>> >>>> Hip 1.0.4 >>>> >>>> - Update resource graphs >>>> - Confirm we're using a string in a regex match expression >>>> - Fix time filter to work with branch list mods in arches >>>> >>>> Lots of updates to the docs (thanks to Adam Cox!) >>>> >>>> - Add note on running ES as daemon, fix other grammar >>>> - Add integrity section to reports >>>> - Slight change in S3 bucket info >>>> - New docs section on converting to .arches from MS Excel >>>> - Add business table name for management_recommendation.e89 node in >>>> heritage_resource graph. >>>> - Add warning about S3 file deletion problem, number some existing >>>> lists. >>>> - Remake all tables straight from graph csvs, except Activity (to >>>> retain the descriptions. addressing issue in forum with incorrect nodes >>>> in >>>> some tables >>>> - Reformat/color nodes in all gephi files, export all graphs as >>>> pdfs in letter/legal and A4/B4, add notes on export and record of colors >>>> used >>>> >>>> -- > -- To post, send email to [email protected]. To unsubscribe, > send email to [email protected]. For more > information, visit https://groups.google.com/d/forum/archesproject?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Arches Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- -- To post, send email to [email protected]. To unsubscribe, send email to [email protected]. For more information, visit https://groups.google.com/d/forum/archesproject?hl=en --- You received this message because you are subscribed to the Google Groups "Arches Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
