Re: [Arches] Modifying forms.py
Hi Adam & Alexei, So far I've made changes to forms.py, classification.htm and classification.js and uncommented the RESOURCE_MODEL line in settings.py, but something is not working correctly, I don't think that my new additions in forms.py are taken into consideration. I am modifying the classification form to add a new field: dynasty, which is a new node on the resource graph that I have previously added and I also added its corresponding authority documents. However I noticed that when I load the page all seem to work well except for the dynasty field (there is no drop down list and even the place holder text is not visible). I also noticed that in my project's models directory where the new forms.py is, there is no forms.pyc, would that indicate that it wasn't interpreted or something? I have included below the parts of the 3 files that I have modified, but basically I was following the steps in this thread( https://groups.google.com/forum/#!searchin/archesproject/forms.py/archesproject/_YyRG8wFUGs/EhXHFmB6w28J ): forms.py: class ClassificationForm(ResourceForm): def update(self, data, files): self.update_nodes('HERITAGE_RESOURCE_TYPE.E55', data) self.update_nodes('TO_DATE.E49', data) self.update_nodes('FROM_DATE.E49', data) self.update_nodes('HERITAGE_RESOURCE_USE_TYPE.E55', data) self.update_nodes('CULTURAL_PERIOD.E55', data) self.update_nodes('STYLE.E55', data) self.update_nodes('ANCILLARY_FEATURE_TYPE.E55', data) self.update_nodes('DYNASTY.E55', data) #added this def load(self, lang): self.data = { 'data': [], 'domains': { 'HERITAGE_RESOURCE_TYPE.E55': Concept().get_e55_domain('HERITAGE_RESOURCE_TYPE.E55'), 'HERITAGE_RESOURCE_USE_TYPE.E55' : Concept().get_e55_domain('HERITAGE_RESOURCE_USE_TYPE.E55'), 'CULTURAL_PERIOD.E55' : Concept().get_e55_domain('CULTURAL_PERIOD.E55'), 'STYLE.E55' : Concept().get_e55_domain('STYLE.E55'), 'ANCILLARY_FEATURE_TYPE.E55' : Concept().get_e55_domain('ANCILLARY_FEATURE_TYPE.E55'), 'DYNASTY.E55' : Concept().get_e55_domain('DYNASTY.E55') } } classification_entities = self.resource.find_entities_by_type_id('PHASE_TYPE_ASSIGNMENT.E17') for entity in classification_entities: to_date_nodes = datetime_nodes_to_dates(self.get_nodes(entity, 'TO_DATE.E49')) from_date_nodes = datetime_nodes_to_dates(self.get_nodes(entity, 'FROM_DATE.E49')) self.data['data'].append({ 'HERITAGE_RESOURCE_TYPE.E55': { 'branch_lists': self.get_nodes(entity, 'HERITAGE_RESOURCE_TYPE.E55') }, 'HERITAGE_RESOURCE_USE_TYPE.E55': { 'branch_lists': self.get_nodes(entity, 'HERITAGE_RESOURCE_USE_TYPE.E55') }, 'CULTURAL_PERIOD.E55': { 'branch_lists': self.get_nodes(entity, 'CULTURAL_PERIOD.E55') }, 'TO_DATE.E49': { 'branch_lists': to_date_nodes }, 'FROM_DATE.E49': { 'branch_lists': from_date_nodes }, 'STYLE.E55': { 'branch_lists': self.get_nodes(entity, 'STYLE.E55') }, 'ANCILLARY_FEATURE_TYPE.E55': { 'branch_lists': self.get_nodes(entity, 'ANCILLARY_FEATURE_TYPE.E55') }, 'PHASE_TYPE_ASSIGNMENT.E17': { 'branch_lists': self.get_nodes(entity, 'PHASE_TYPE_ASSIGNMENT.E17') }, 'DYNASTY.E55': { 'branch_lists': self.get_nodes(entity, 'DYNASTY.E55') } }) classification.htm: {% trans "DYNASTY" %} and here: classification.js: this.addBranchList(new BranchList({ el: this.$el.find('#dynasty-section')[0], data: currentEditedClassification, dataKey: 'DYNASTY.E55', singleEdit: true })); Thanks a lot -- Mai On Wed, Jan 20, 2016 at 9:35 PM, Adam Coxwrote: > Hi Mai, yes, those are the three places you'll need to make changes to > support new nodes. However, you'll also need to uncomment the > RESOURCE_MODEL line in your app's settings.py file, to make sure that it > points to the location of your new resource.py file. > > If
Re: [Arches] Modifying forms.py
Wonderful! That fixed the issue with the forms file. Thanks a lot I still can't see the drop down menu though because there is another console error saying: Uncaught Error: You cannot apply bindings multiple times to the same element. which is kind of weird because I don't think I applied multiple bindings to the same element. On Thu, Jan 21, 2016 at 8:11 PM, Adam Cox <mr.adam...@gmail.com> wrote: > Oh, it looks like resource.py originally has this line: > from arches_hip.models import forms > you'll need to comment that out and add > import forms > in order to reference the correct forms.py file. > > Hopefully that should do it. The select2 error should be solved too. > > Adam > > On Thu, Jan 21, 2016 at 11:57 AM, Mai Abdelaziz El Kady < > mai.abdela...@aucegypt.edu> wrote: > >> Hi Adam, >> >> Thanks a lot for your quick response. >> I am not using Apache, I am using the default django development server, >> so I am not sure why this is happening. I should probably mention that the >> resource.py in the same directory as forms.py have a corresponding >> resource.pyc file, which got me thinking that maybe there is something >> wrong with the forms.py file, but I can't detect that anyway, I only >> changed a few lines. >> >> As for the error messages from the console, this was it: Uncaught >> cdnjs.cloudflare.com/ajax/libs/knockout/3.3.0/knockout-min.js:66 query >> function not defined for Select2 undefined. >> >> But like you said, I should probably fix the issue in the forms.py first. >> I'd appreciate it if you have more ideas about what could be wrong. >> >> Thanks a lot >> -- >> Mai >> >> >> On Thu, Jan 21, 2016 at 7:36 PM, Adam Cox <mr.adam...@gmail.com> wrote: >> >>> Hi Mai, >>> >>> First, yes, the lack of .pyc file indicates that your forms.py file has >>> not been referenced. If you are using apache to serve your app, you'll >>> need to restart apache each time your change a .py file. If you're running >>> the dev server, it will recognize changes to .py files and reset itself >>> (you can see this happen in the console). >>> >>> Second, I'd recommend turning on developer tools in whatever browser you >>> are using and check out the console. You will probably see an error there, >>> which may (or may not!) be helpful in figuring out what's going on. One >>> note, I was actually just editing the classification form, and it's a >>> little more complex because it's a wizard form. You'll see that in the js >>> file, there is actually one more place that you need to reference your new >>> node. >>> >>> Still, the forms.py issue is probably the first thing to tackle... >>> >>> On Thu, Jan 21, 2016 at 11:26 AM, Mai Abdelaziz El Kady < >>> mai.abdela...@aucegypt.edu> wrote: >>> >>>> Hi Adam & Alexei, >>>> >>>> So far I've made changes to forms.py, classification.htm and >>>> classification.js and uncommented the RESOURCE_MODEL line in settings.py, >>>> but something is not working correctly, I don't think that my new additions >>>> in forms.py are taken into consideration. I am modifying the classification >>>> form to add a new field: dynasty, which is a new node on the resource graph >>>> that I have previously added and I also added its corresponding authority >>>> documents. >>>> However I noticed that when I load the page all seem to work well >>>> except for the dynasty field (there is no drop down list and even the place >>>> holder text is not visible). I also noticed that in my project's models >>>> directory where the new forms.py is, there is no forms.pyc, would that >>>> indicate that it wasn't interpreted or something? >>>> I have included below the parts of the 3 files that I have modified, >>>> but basically I was following the steps in this thread( >>>> https://groups.google.com/forum/#!searchin/archesproject/forms.py/archesproject/_YyRG8wFUGs/EhXHFmB6w28J >>>> ): >>>> >>>> >>>> forms.py: >>>> class ClassificationForm(ResourceForm): >>>> def update(self, data, files): >>>> >>>> self.update_nodes('HERITAGE_RESOURCE_TYPE.E55', data) >>>> self.update_nodes('TO_DATE.E49', data) >>>> self.update_nodes('FROM_DATE.E49', data) >>>> self.update_nodes('HERITAGE_RESOURCE_USE_TYPE.E55', data) >>>> self.upda
Re: [Arches] Modifying forms.py
Hi Adam, Thanks a lot for your quick response. I am not using Apache, I am using the default django development server, so I am not sure why this is happening. I should probably mention that the resource.py in the same directory as forms.py have a corresponding resource.pyc file, which got me thinking that maybe there is something wrong with the forms.py file, but I can't detect that anyway, I only changed a few lines. As for the error messages from the console, this was it: Uncaught cdnjs.cloudflare.com/ajax/libs/knockout/3.3.0/knockout-min.js:66 query function not defined for Select2 undefined. But like you said, I should probably fix the issue in the forms.py first. I'd appreciate it if you have more ideas about what could be wrong. Thanks a lot -- Mai On Thu, Jan 21, 2016 at 7:36 PM, Adam Cox <mr.adam...@gmail.com> wrote: > Hi Mai, > > First, yes, the lack of .pyc file indicates that your forms.py file has > not been referenced. If you are using apache to serve your app, you'll > need to restart apache each time your change a .py file. If you're running > the dev server, it will recognize changes to .py files and reset itself > (you can see this happen in the console). > > Second, I'd recommend turning on developer tools in whatever browser you > are using and check out the console. You will probably see an error there, > which may (or may not!) be helpful in figuring out what's going on. One > note, I was actually just editing the classification form, and it's a > little more complex because it's a wizard form. You'll see that in the js > file, there is actually one more place that you need to reference your new > node. > > Still, the forms.py issue is probably the first thing to tackle... > > On Thu, Jan 21, 2016 at 11:26 AM, Mai Abdelaziz El Kady < > mai.abdela...@aucegypt.edu> wrote: > >> Hi Adam & Alexei, >> >> So far I've made changes to forms.py, classification.htm and >> classification.js and uncommented the RESOURCE_MODEL line in settings.py, >> but something is not working correctly, I don't think that my new additions >> in forms.py are taken into consideration. I am modifying the classification >> form to add a new field: dynasty, which is a new node on the resource graph >> that I have previously added and I also added its corresponding authority >> documents. >> However I noticed that when I load the page all seem to work well except >> for the dynasty field (there is no drop down list and even the place holder >> text is not visible). I also noticed that in my project's models directory >> where the new forms.py is, there is no forms.pyc, would that indicate that >> it wasn't interpreted or something? >> I have included below the parts of the 3 files that I have modified, but >> basically I was following the steps in this thread( >> https://groups.google.com/forum/#!searchin/archesproject/forms.py/archesproject/_YyRG8wFUGs/EhXHFmB6w28J >> ): >> >> >> forms.py: >> class ClassificationForm(ResourceForm): >> def update(self, data, files): >> >> self.update_nodes('HERITAGE_RESOURCE_TYPE.E55', data) >> self.update_nodes('TO_DATE.E49', data) >> self.update_nodes('FROM_DATE.E49', data) >> self.update_nodes('HERITAGE_RESOURCE_USE_TYPE.E55', data) >> self.update_nodes('CULTURAL_PERIOD.E55', data) >> self.update_nodes('STYLE.E55', data) >> self.update_nodes('ANCILLARY_FEATURE_TYPE.E55', data) >> self.update_nodes('DYNASTY.E55', data) #added this >> >> def load(self, lang): >> >> self.data = { >> 'data': [], >> 'domains': { >> 'HERITAGE_RESOURCE_TYPE.E55': >> Concept().get_e55_domain('HERITAGE_RESOURCE_TYPE.E55'), >> 'HERITAGE_RESOURCE_USE_TYPE.E55' : >> Concept().get_e55_domain('HERITAGE_RESOURCE_USE_TYPE.E55'), >> 'CULTURAL_PERIOD.E55' : >> Concept().get_e55_domain('CULTURAL_PERIOD.E55'), >> 'STYLE.E55' : Concept().get_e55_domain('STYLE.E55'), >> 'ANCILLARY_FEATURE_TYPE.E55' : >> Concept().get_e55_domain('ANCILLARY_FEATURE_TYPE.E55'), >>'DYNASTY.E55' : Concept().get_e55_domain('DYNASTY.E55') >> } >> } >> >> classification_entities = >> self.resource.find_entities_by_type_id('PHASE_TYPE_ASSIGNMENT.E17') >> >> for entity in classification_entities: >> to_date_nodes = >> datetime_nodes_to_dates(self.get_nodes(entity, 'TO_DATE.E49')) >> from_date_nodes = >&
[Arches] Modifying forms.py
Hello All, I just wanted to make sure that I am following the correct steps after adding new nodes to the resource graphs, According to my understanding and to reading some responses on the group here, I know that I should make changes in forms.py, and to some html and js files. I have modified html and js files with no problems before. but there seems to be an issue when I modify the forms.py file. Basically what I did was copy the forms.py and resource.py files from arches-hip to my project directory/models then I made the necessary changes to forms.py. Is there some file somewhere else that I need to modify as well? Thanks -- Mai -- -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [Arches] Re: Installing Arches-HIP: Creating Database Error: ImportError: No module named resource
Hi Ivan, We realized that we made a lot of installation mistakes to begin with when we first encountered the "concepts does not exist " error, so we just started a clean installation back then. However, I was reinstalling Arches lately, and I encountered that error again, but this time the only mistake was in how I set up postgres and the database, so I followed the settings here ( https://github.com/archesproject/arches/blob/master/arches/install/ubuntu_trusty_setup.sh ) as closely as I could, and the problem was solved. And as Alexei mentioned you'll need to use python 2.7.6. We were installing Arches on Redhat 6 which comes with python2.6 so we had to install python2.7.6 and make sure that this is actually the version that is being used rather than 2.6 Hope that helps. Best Regards, Mai -- -- 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. For more options, visit https://groups.google.com/d/optout.
[Arches] Re: Creating users with different user permissions
Hi Adam, Thanks a lot for your quick response and for explaining how I can limit the access to the RDM. I followed the steps you have posted, and at first it looked like it worked because when I login as the data_manager user (the one with no access to the RDM), the RDM tab is no longer there which is good. However when this user tries to access items from the resource manager, the login to arches appears and he cannot access any resource manager items even after typing his user name and password. This data_manager user belong to the edit and read groups, but he is not a superuser nor a staff. I find this a bit odd because from my understanding of the code, the users belonging to the edit group should be able to access the resource manager, am I right or did I miss out something? Best Regards, Mai -- -- 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. For more options, visit https://groups.google.com/d/optout.
[Arches] Creating users with different user permissions
Hello All, I have got the new version of Arches and Arches-hip up and running and I am trying to create a new user (a data manager user) next to the anonymous and the admin users. This new user should be able to access everything on the website except the RDM. I am having some troubles understanding the different meanings for the user permissions, but this is not what troubles me most. The main problem I am facing is that changing the user's permissions seem to have no effect at all, so this got me thinking that maybe I have missed out something. This is what I have done so far: - I went to siteurl/admin/auth and created a new user with staff status and super user status unchecked - Chosen all available user permissions and assigned them to this new user. Even though I have assigned the new user all privileges (which is way more than what I actually want to do), the new user still has no access to the resource manager or the RDM. So are there any other files that I need to modify to achieve the desired results. Thanks a lot Best Regards, Mai -- -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [Arches] Re: Installing Arches-HIP: Creating Database Error: ImportError: No module named resource
Hello Alexei and Adam, Thanks a lot for your suggestions. It was indeed an internal network access problem. Now it seems that the next step would be installing Apache, hope we don't run in a lot of troubles when doing that. And again loads of thanks for your efforts and support. -- Sincerely, Mai On Wednesday, September 16, 2015 at 7:31:27 PM UTC+2, Alexei Peters wrote: > > Hi Mai, > Just so you understand what happened. When you initially installed pip it > was installed in the global python location. From there you could install > virtualenv. Virtualenv comes with it's own instance of pip, so that when > you create a virtualenv you can pip install from an activated environment. > To install arches you need to run the pip install arches command from the > activated environment. > > As far as using the runserver command goes, I'd first try running it from > the default ip to see if that works. You simply need to run this: > python manage.py runserver > > The site should then be accessable from: > http://localhost:8000 > > Try that a see if that works. If it does that would lead me to believe > there's an issue with the routing of the ip to the dev server that comes > with django. > For production you should use apache to host you app. > > Cheers, > Alexei > > > Director of Web Development - Farallon Geographics, Inc. - 971.227.3173 > > On Tue, Sep 15, 2015 at 6:11 AM, Mai Abdelaziz El Kady < > mai.ab...@aucegypt.edu > wrote: > > Hi Alexei, > > Apparently I ended up using the pip installation that was outside the > virtual environment, so arches was installed outside it as well. After > using the proper pip, I've got Arches-hip in the right place and after > troubleshooting some more psql related errors, the command "python > manage.py packages -o install" seems to run fine without any errors. so > Thanks a zillion for your continued help and support!! we really appreciate > it. > Now I think we're almost there, we are running this command: > "python manage.py runserver 12.*.*.*:**" > and it runs fine on a terminal returning zero errors and saying "Starting > development server at http://12.*.*.*:**/;, however when opening " > http://12.*.*.* : **/" in a browser, we get a message that the page is > not available. So do you have any idea what could have gone wrong? > > Thanks a lot > > > > On Mon, Sep 14, 2015 at 6:57 PM, Alexei Peters <ape...@fargeo.com > > wrote: > > Hi Mai, > Wow this is really baffling! > > Just to confirm the steps you took to install arches from a clean machine > (generally): > >1. Install pip >2. pip install virtualenv >3. $ virtualenv ENV >4. $ source ENV/bin/activate >5. (ENV)$ pip install arches_hip > > After doing that, you said that you have arches and arches_hip directories > in the default python location? Is that true? > > -Alexei > > > > Director of Web Development - Farallon Geographics, Inc. - 971.227.3173 > > On Mon, Sep 14, 2015 at 12:32 AM, Mai Abdelaziz El Kady < > mai.ab...@aucegypt.edu > wrote: > > Hi Alexei, > > Actually, I used pip install arches_hip > > Thanks > > > On Sun, Sep 13, 2015 at 7:54 PM, Alexei Peters <ape...@fargeo.com > > wrote: > > Hi Mai, > Did you pip install arches, or arches-hip? > From the looks of the error message arches-hip isn't installed. > Cheers, > Alexei > > > Director of Web Development - Farallon Geographics, Inc. - 971.227.3173 > > On Sun, Sep 13, 2015 at 1:50 AM, <mai.ab...@aucegypt.edu > > wrote: > > Hi Adam and Alexei, > > We have decided to start a clean installation of Arches on a new sever, we > are now installing it on Red Hat Enterprise Linux Server release 6.7. > There are good news and bad news, the bad news is that we got a brand new > error message when running: python manage.py packages -o install from > the virtual environment, the error is listed below. > The good news is that the error message refers to the python that is in > the virtual environment not outside it and when running which python, it > refers to the one inside the virtual environment > (/projects/ENV/bin/python). However, arches and arches-hip still have > directories in (/usr/local/lib/python2.7/site-packages/) and what I got > from Alexei's reply is that this is not okay. So should I try uninstalling > it again or not. Should these arches directories be in > (/projects/ENV/lib/python2.7/site-packages/) instead, for it to function > correctly? > > The new error that we get is: > Traceback (most recent call last): > File "manage.py", line 28, in > e
Re: [Arches] Re: Installing Arches-HIP: Creating Database Error: ImportError: No module named resource
Hi Alexei, Actually, I used pip install arches_hip Thanks On Sun, Sep 13, 2015 at 7:54 PM, Alexei Peters <apet...@fargeo.com> wrote: > Hi Mai, > Did you pip install arches, or arches-hip? > From the looks of the error message arches-hip isn't installed. > Cheers, > Alexei > > > Director of Web Development - Farallon Geographics, Inc. - 971.227.3173 > > On Sun, Sep 13, 2015 at 1:50 AM, <mai.abdela...@aucegypt.edu> wrote: > >> Hi Adam and Alexei, >> >> We have decided to start a clean installation of Arches on a new sever, >> we are now installing it on Red Hat Enterprise Linux Server release 6.7. >> There are good news and bad news, the bad news is that we got a brand new >> error message when running: python manage.py packages -o install from >> the virtual environment, the error is listed below. >> The good news is that the error message refers to the python that is in >> the virtual environment not outside it and when running which python, it >> refers to the one inside the virtual environment >> (/projects/ENV/bin/python). However, arches and arches-hip still have >> directories in (/usr/local/lib/python2.7/site-packages/) and what I got >> from Alexei's reply is that this is not okay. So should I try uninstalling >> it again or not. Should these arches directories be in >> (/projects/ENV/lib/python2.7/site-packages/) instead, for it to function >> correctly? >> >> The new error that we get is: >> Traceback (most recent call last): >> File "manage.py", line 28, in >> execute_from_command_line(sys.argv) >> File >> "/opt/projects/ENV/lib/python2.7/site-packages/django/core/management/__init__.py", >> line 338, in execute_from_command_line >> utility.execute() >> File >> "/opt/projects/ENV/lib/python2.7/site-packages/django/core/management/__init__.py", >> line 303, in execute >> settings.INSTALLED_APPS >> File >> "/opt/projects/ENV/lib/python2.7/site-packages/django/conf/__init__.py", >> line 48, in __getattr__ >> self._setup(name) >> File >> "/opt/projects/ENV/lib/python2.7/site-packages/django/conf/__init__.py", >> line 44, in _setup >> self._wrapped = Settings(settings_module) >> File >> "/opt/projects/ENV/lib/python2.7/site-packages/django/conf/__init__.py", >> line 92, in __init__ >> mod = importlib.import_module(self.SETTINGS_MODULE) >> File "/usr/local/lib/python2.7/importlib/__init__.py", line 37, in >> import_module >> __import__(name) >> File "/opt/projects/my_hip_app/my_hip_app/settings.py", line 3, in >> >> from arches_hip.settings import * >> ImportError: No module named arches_hip.settings >> >> Once again, Thanks a lot for your continued help and support. >> >> -- >> Sincerely, >> Mai Abdelaziz >> >> >> On Wednesday, September 9, 2015 at 6:52:59 PM UTC+2, Alexei Peters wrote: >>> >>> Hi Mai, >>> It looks like you have 'arches' installed in the default python location >>> (at /usr/lib/python2.7/site-packages/). Maybe you installed arches >>> there first before realizing that you needed to use a virtual environment. >>> I would try un-installing "arches' from the default python instance. >>> >>> Open a new terminal window and make sure the virtual environment IS NOT >>> activated. >>> run the command "pip uninstall arches" >>> >>> Go to /usr/lib/python2.7/site-packages/ and confirm that the arches >>> directory is gone (if not you can simply delete it). >>> I'd also recommend uninstalling all the arches dependencies (found in >>> arches/arches/install/requirements.txt) >>> >>> Once you've done that, re-activate your virtualenv and try running >>> >>>> *python manage.py packages -o install* >>> >>> >>> Let us know if that helps. >>> Cheers, >>> Alexei >>> >>> >>> Director of Web Development - Farallon Geographics, Inc. - 971.227.3173 >>> >>> On Tue, Sep 8, 2015 at 10:47 AM, Adam Cox <mr.ad...@gmail.com> wrote: >>> >>>> Hello Mai, it still bothers me that your error messages were coming >>>> from python files that were not within your virtual environment, but in the >>>> default python installation instead (even though I can see that you had the >>>> virtual environment activated). The last error message you sent looked >>>> lik
Re: [Arches] Re: Installing Arches-HIP: Creating Database Error: ImportError: No module named resource
Hi Adam and Alexei, We have decided to start a clean installation of Arches on a new sever, we are now installing it on Red Hat Enterprise Linux Server release 6.7. There are good news and bad news, the bad news is that we got a brand new error message when running: python manage.py packages -o install from the virtual environment, the error is listed below. The good news is that the error message refers to the python that is in the virtual environment not outside it and when running which python, it refers to the one inside the virtual environment (/projects/ENV/bin/python). However, arches and arches-hip still have directories in (/usr/local/lib/python2.7/site-packages/) and what I got from Alexei's reply is that this is not okay. So should I try uninstalling it again or not. Should these arches directories be in (/projects/ENV/lib/python2.7/site-packages/) instead, for it to function correctly? The new error that we get is: Traceback (most recent call last): File "manage.py", line 28, in execute_from_command_line(sys.argv) File "/opt/projects/ENV/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line utility.execute() File "/opt/projects/ENV/lib/python2.7/site-packages/django/core/management/__init__.py", line 303, in execute settings.INSTALLED_APPS File "/opt/projects/ENV/lib/python2.7/site-packages/django/conf/__init__.py", line 48, in __getattr__ self._setup(name) File "/opt/projects/ENV/lib/python2.7/site-packages/django/conf/__init__.py", line 44, in _setup self._wrapped = Settings(settings_module) File "/opt/projects/ENV/lib/python2.7/site-packages/django/conf/__init__.py", line 92, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/local/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "/opt/projects/my_hip_app/my_hip_app/settings.py", line 3, in from arches_hip.settings import * ImportError: No module named arches_hip.settings Once again, Thanks a lot for your continued help and support. -- Sincerely, Mai Abdelaziz On Wednesday, September 9, 2015 at 6:52:59 PM UTC+2, Alexei Peters wrote: > > Hi Mai, > It looks like you have 'arches' installed in the default python location > (at /usr/lib/python2.7/site-packages/). Maybe you installed arches there > first before realizing that you needed to use a virtual environment. > I would try un-installing "arches' from the default python instance. > > Open a new terminal window and make sure the virtual environment IS NOT > activated. > run the command "pip uninstall arches" > > Go to /usr/lib/python2.7/site-packages/ and confirm that the arches > directory is gone (if not you can simply delete it). > I'd also recommend uninstalling all the arches dependencies (found in > arches/arches/install/requirements.txt) > > Once you've done that, re-activate your virtualenv and try running > >> *python manage.py packages -o install* > > > Let us know if that helps. > Cheers, > Alexei > > > Director of Web Development - Farallon Geographics, Inc. - 971.227.3173 > > On Tue, Sep 8, 2015 at 10:47 AM, Adam Cox <mr.ad...@gmail.com > > wrote: > >> Hello Mai, it still bothers me that your error messages were coming from >> python files that were not within your virtual environment, but in the >> default python installation instead (even though I can see that you had the >> virtual environment activated). The last error message you sent looked >> like you were using CentOS. CentOS 7 ships with Python 2.7.5 (as you can >> see here <http://mirror.centos.org/centos/7/os/x86_64/Packages/>), but >> Arches needs Python 2.7.6. I'm unclear what problems that version >> difference may cause, but this may be one of them. While your virtual >> environment is activated, try *python --version *and *which python *to >> see what version of Python you are running and where it is located. >> >> I know this is kind of a step behind the other troubleshooting you've >> been doing, but it may be worth checking out. >> >> Adam >> >> On Thursday, September 3, 2015 at 3:15:12 AM UTC-5, Mai Abdelaziz El Kady >> wrote: >>> >>> Hi Alexei, >>> >>> I am sorry about the delayed response. >>> I am stumped as well, I have tried your last suggestion and the results >>> were the same. >>> When accessing psql through a terminal we found that the table concepts >>> is created and there are even values in it! >>> We tried selecting from it using the command "SELECT * FROM >>> concepts.concepts;
Re: [Arches] Re: Installing Arches-HIP: Creating Database Error: ImportError: No module named resource
Hi Cyrus, My name is Mai and I am working with Asmaa in installing Arches. Thank you for your quick reply. We tried your suggestion but unfortunately the error remained the same, so do you have any more ideas about what could be the cause of it? Thanks a lot for your help and support -- Sincerely, Mai Abdelaziz On Mon, Aug 24, 2015 at 5:01 PM, Cyrus Hiatt cyrusnhi...@gmail.com wrote: Hi Asmaa - Glad to hear you got a bit further. Sorry I didn't catch this last time, but I see that the paths (e.g. 'os.path') in: RESOURCE_GRAPH_LOCATIONS, CONCEPT_SCHEME_LOCATIONS, and BUSINESS_DATA_FILES have been uncommented. You should try commenting those lines back out again until you are ready to modify or add to the files in those directories. The settings for those variables should look like this: # RESOURCE_GRAPH_LOCATIONS = ( # # Put strings here, like /home/data/resource_graphs or C:/data/resource_graphs. # # Always use forward slashes, even on Windows. # # Don't forget to use absolute paths, not relative paths. # os.path.join(PACKAGE_ROOT, 'source_data', 'resource_graphs'), # ) CONCEPT_SCHEME_LOCATIONS = ( # Put strings here, like /home/data/authority_files or C:/data/authority_files. # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. #'absolute/path/to/authority_files', # os.path.normpath(os.path.join(PACKAGE_ROOT, 'source_data', 'concepts', 'authority_files')), ) BUSISNESS_DATA_FILES = ( # Put strings here, like /home/html/django_templates or C:/www/django/templates. # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. # os.path.normpath(os.path.join(PACKAGE_ROOT, 'source_data', 'business_data', 'sample.arches')), ) Cheers, Cyrus On Mon, Aug 24, 2015 at 3:18 AM, Asmaa Ayman aay...@aucegypt.edu wrote: Hi Cyrus, Thanks a lot for the help! We did what you said and it passed that error but now we are facing this one: django.db.utils.ProgrammingError: relation concepts does not exist LINE 1: ...concepts.nodetype, concepts.legacyoid FROM concepts... You can find below a more informative log, and I am also attaching the entire log. LOADING GRAPHS (/usr/share/sandboxes/egyarch/my_hip_app/my_hip_app/source_data/resource_graphs) --- INDEXING ENTITY NODES - Traceback (most recent call last): File manage.py, line 28, in module execute_from_command_line(sys.argv) File /usr/lib/python2.7/site-packages/django/core/management/__init__.py, line 399, in execute_from_command_line utility.execute() File /usr/lib/python2.7/site-packages/django/core/management/__init__.py, line 392, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File /usr/lib/python2.7/site-packages/django/core/management/base.py, line 242, in run_from_argv self.execute(*args, **options.__dict__) File /usr/lib/python2.7/site-packages/django/core/management/base.py, line 285, in execute output = self.handle(*args, **options) File /usr/lib/python2.7/site-packages/arches/management/commands/packages.py, line 67, in handle self.install(package_name) File /usr/lib/python2.7/site-packages/arches/management/commands/packages.py, line 114, in install install() File /usr/share/sandboxes/egyarch/my_hip_app/my_hip_app/setup.py, line 6, in install setup.install() File /usr/lib/python2.7/site-packages/arches_hip/setup.py, line 24, in install load_resource_graphs() File /usr/lib/python2.7/site-packages/arches_hip/setup.py, line 47, in load_resource_graphs resource_graphs.load_graphs(break_on_error=True) File /usr/lib/python2.7/site-packages/arches/management/commands/package_utils/resource_graphs.py, line 69, in load_graphs concepts.index_entity_concept_lables() File /usr/lib/python2.7/site-packages/arches/management/commands/package_utils/concepts.py, line 17, in index_entity_concept_lables domains_concept = Concept('----0003') File /usr/lib/python2.7/site-packages/arches/app/models/concept.py, line 60, in __init__ self.get(args[0]) File /usr/lib/python2.7/site-packages/arches/app/models/concept.py, line 97, in get self.load(models.Concepts.objects.get(pk=id)) File /usr/lib/python2.7/site-packages/django/db/models/manager.py, line 151, in get return self.get_queryset().get(*args, **kwargs) File /usr/lib/python2.7/site-packages/django/db/models/query.py, line 304, in get num = len(clone) File /usr/lib/python2.7/site-packages/django/db/models/query.py, line 77, in __len__ self._fetch_all() File /usr/lib/python2.7/site-packages/django/db/models/query.py, line 857, in _fetch_all self._result_cache = list(self.iterator()) File /usr/lib/python2.7/site-packages/django/db/models/query.py, line 220, in iterator