Re: [Arches] Where is django configuration file my_project.settings

2019-05-21 Thread Martha S
Adam,

There is another setting in settings.py that needs to be updated to allow 
for projects that aren't named arches: 
APP_ROOT = 
os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe( 
is going to result in a path that includes the name of my project. 

APP_Root is then used in a number of other paths, resulting in a bunch of 
404s, because the files are actually located in an arches folder under 
ENV/lib/python2.7/site-packages.

Rather than copy all the files in the arches folder to a folder with my 
project name or renaming the arches folder, how would you recommend 
APP_ROOT be defined?

Thanks,
Martha



On Thursday, May 16, 2019 at 12:36:12 PM UTC-7, Adam Cox wrote:
>
> Ok, are you using this documentation for setting up Apache? 
> https://arches.readthedocs.io/en/stable/serving-arches-with-apache/#setup-apache
>  
> Now that I'm looking at it, I think the paths in it should be updated to 
> use the my_project context that we use in the main installation 
> instructions. Looks like I originally wrote it as to serve the "core" 
> arches code, not a separate project.
>
> If you are getting errors about importing settings, the first thing to 
> check is that the paths in the python process are correct.
>
> So, this is what I'll be putting in the docs right now for an update:
>
> WSGIDaemonProcess arches 
> python-path=/home/ubuntu/Projects/my_project:/home/ubuntu/Projects/ENV/lib/python2.7/site-packages
> WSGIScriptAlias /  
> /home/ubuntu/Projects/my_project/my_project/wsgi.py process-group=arches
>
> I think the key difference here is that the first path in the 
> "python-path" argument is to the directory above my_project/settings.py.
>
> Let me know if that works.
>
> Adam
>
>
>
> On Thu, May 16, 2019 at 2:00 PM Martha S  > wrote:
>
>> My development server is running fine, too, Adam,
>>
>> This problem surfaces when we try to deploy in Apache.
>>
>> Martha
>>
>> On Thursday, May 16, 2019 at 11:40:56 AM UTC-7, Adam Cox wrote:
>>>
>>> Hi Martha,
>>>
>>> I just unmarked Colin's answer as a duplicate so that I could address 
>>> the settings question he had. In short, if you are having trouble, I think 
>>> it must be a different issue; it sounds like his development server was 
>>> running fine.
>>>
>>> Cheers,
>>> Adam
>>>
>>> On Thu, May 16, 2019 at 1:25 PM Martha S  wrote:
>>>
 Since Colin's thread was locked and re-directed, I'm using the same 
 title to respond to his comment regarding my_project.settings. When we 
 reached the same point with the same problem, I examined some of the stack 
 trace. As Colin is doing, I am installing arches on a new machine, not 
 upgrading a machine with an older version.

 It appears that giving your project a name other than arches results in 
 some invalid settings in some of the py files. For example, settings.py 
 loads the arches library, but immediately makes calls to modules in the 
 projectname library, which doesn't exist:

 import os
 import arches
 import inspect

 try:
 from arches.settings import *
 except ImportError:
 pass

 APP_ROOT = 
 os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe(
 STATICFILES_DIRS =  (os.path.join(APP_ROOT, 'media'),) + 
 STATICFILES_DIRS

 DATATYPE_LOCATIONS.append('hpla.datatypes')
 FUNCTION_LOCATIONS.append('hpla.functions')



 Similarly, wsgi.py, which is the file that generated the error Colin 
 mentioned, fails on the following line:

 os.environ['DJANGO_SETTINGS_MODULE'] = "hpla.settings"

 I experimented with changing hpla to arches in wsgi.py and got further, 
 but I'm about to scrap everything and re-install the project as arches. I 
 could go through all of the files in the stack trace and replace all 
 'hpla.' occurrences with 'arches.', but I think it will be easier for 
 long-term maintenance to just go with arches. So long as I can call the 
 production product what I want, I should be fine.


 -- 
 -- To post, send email to arches...@googlegroups.com. To unsubscribe, 
 send email to arches...@googlegroups.com. 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 arches...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/archesproject/e81e3cd8-098a-40fd-bf97-7af64d42b7c2%40googlegroups.com
  
 
 .

>>> -- 
>> -- To post, send email to arches...@googlegroups.com . To 
>> unsubscribe, send email to 

[Arches] Re: arches 4.4.1: problem loading pages

2019-05-21 Thread Adam Cox
Hi Marlène,

Sounds like you were able to figure this out and move on so I'm going to 
close this forum thread, but I did make a ticket in the Arches repo to 
capture any further work on this numeral.js issue: 
https://github.com/archesproject/arches/issues/4841. It could have been 
something strange in your environment, but it also could be a legitimate 
yarn issue that we haven't yet addressed. If you've learned anything more, 
let's move the discussion to that ticket.

Thanks!

Adam

On Wednesday, May 15, 2019 at 9:44:53 AM UTC-5, Marlene Gilles wrote:
>
> Hello,
>
> For several months I have had the opportunity to install arches a good 
> dozen times to test and create forms from in-house ontologies. 
> I recently tried to install arches 4.4.1. Everything is set up as usual (I 
> think) but I can no longer access the settings pages or create new forms (I 
> can access the design page): the pages seem to want to load but do not end. 
> I don't get an error message. I get the same result via django or apache.
> I'm working on a ubuntu 16.04 virtual machine (announcement of new version 
> said 16.04 or 18.04). To be sure of my installation procedure, I 
> re-installed the previous version of arches on the same machine and it 
> works very well.
>
> Is this due to the new version of Elasticsearch? Do you have any idea how 
> I can solve this problem?
> I enclose text files containing the messages obtained when trying to 
> create a new resource model with both arches 4.3 and 4.4.1 if it can help.
>
> Many thanks for your help.
> Marlène
>

-- 
-- To post, send email to archesproject@googlegroups.com. To unsubscribe, send 
email to archesproject+unsubscr...@googlegroups.com. 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 archesproject+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/archesproject/82172b81-50bf-4ec9-9c06-98dd6d8970f7%40googlegroups.com.