Re: [Arches] Re: Internal server error (500) Non-valid UUID error

2020-08-13 Thread Adam Cox
Hi Anaïs, yes, the arches.log permissions are something that need to be
handled.

Briefly, that file needs to be written to by whichever user is running the
app. If you use the dev server (python manage.py runserver) then, in your
case, that user is ubuntu. If you are serving the app with apache, then the
user is www-data. These two commands should handle it for you.

First set the owner of the file as ubuntu and the group of the file
www-data:

sudo chown ubuntu:www-data /home/ubuntu/Projects/hpm/hpm/arches.log

Then change the file permissions so both the owner and the group have read
and write permissions (also allow other users to read the file though
that's probably irrelevant):

sudo chmod 664 /home/ubuntu/Projects/hpm/hpm/arches.log

You can read more about permissions on Linux here:
https://www.linux.com/training-tutorials/understanding-linux-file-permissions/

Hope that helps.

Adam

On Thu, Aug 13, 2020 at 7:21 PM anais@gmail.com 
wrote:

> Hi Angela,
> Thanks a lot for your answer, yes it is the same error.
> When I run the python manage.py showmigrations command, I get the
> following error:
>
> (ENV) *ubuntu@ip-172-31-72-128*:*~/Projects/hpm*$ python3 manage.py
> showmigrations
>
> No module named 'arches.settings_local'
>
> Error attempting to load settings from relative '.settings_local'.
> Attempting 'arches.settings_local' import
>
> Error attempting to load settings from 'arches.settings_local.py'.
>
> No module named 'arches.settings_local'
>
> Traceback (most recent call last):
>
>   File "/usr/lib/python3.8/logging/config.py", line 563, in configure
>
> handler = self.configure_handler(handlers[name])
>
>   File "/usr/lib/python3.8/logging/config.py", line 744, in
> configure_handler
>
> result = factory(**kwargs)
>
>   File "/usr/lib/python3.8/logging/__init__.py", line 1143, in __init__
>
> StreamHandler.__init__(self, self._open())
>
>   File "/usr/lib/python3.8/logging/__init__.py", line 1172, in _open
>
> return open(self.baseFilename, self.mode, encoding=self.encoding)
>
> PermissionError: [Errno 13] Permission denied:
> '/home/ubuntu/Projects/hpm/hpm/arches.log'
>
>
> The above exception was the direct cause of the following exception:
>
>
> Traceback (most recent call last):
>
>   File "manage.py", line 30, in 
>
> execute_from_command_line(sys.argv)
>
>   File
> "/home/ubuntu/Projects/ENV/lib/python3.8/site-packages/django/core/management/__init__.py",
> line 381, in execute_from_command_line
>
> utility.execute()
>
>   File
> "/home/ubuntu/Projects/ENV/lib/python3.8/site-packages/django/core/management/__init__.py",
> line 357, in execute
>
> django.setup()
>
>   File
> "/home/ubuntu/Projects/ENV/lib/python3.8/site-packages/django/__init__.py",
> line 19, in setup
>
> configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
>
>   File
> "/home/ubuntu/Projects/ENV/lib/python3.8/site-packages/django/utils/log.py",
> line 76, in configure_logging
>
> logging_config_func(logging_settings)
>
>   File "/usr/lib/python3.8/logging/config.py", line 808, in dictConfig
>
> dictConfigClass(config).configure()
>
>   File "/usr/lib/python3.8/logging/config.py", line 570, in configure
>
> raise ValueError('Unable to configure handler '
>
> ValueError: Unable to configure handler 'file'
>
>
>
> And when I check the permissions of the arches.log file it is:
>
>  -rwxr-xr-x 1 root root  22322 Aug 11 14:29 *arches.log*
>
> In the arches.log there is no recent log as to be expected. How should I
> change the permissions for this file?
>
>
> Thanks again for any answer,
>
> best
>
> A.
> Le mardi 11 août 2020 à 12:10:04 UTC-7, ala...@gmail.com a écrit :
>
>> Hi Anais,
>>
>> Dale reported a similar error in version 4:
>> https://groups.google.com/d/msg/archesproject/gYnmrToi8eE/PUJ-6ys-AQAJ
>>
>> I'm not sure if the same troubleshooting would apply for v5, but do you
>> have pending migrations to run as Cyrus suggested in that thread?
>>
>> Angela
>>
>>
> --
> -- 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/b182dfff-77b7-47fa-98ae-3e072e32d091n%40googlegroups.com
> 
> .
>

-- 
-- 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 

[Arches] Re: Internal server error (500) Non-valid UUID error

2020-08-13 Thread anais....@gmail.com
Hi Angela, 
Thanks a lot for your answer, yes it is the same error.
When I run the python manage.py showmigrations command, I get the following 
error:

(ENV) *ubuntu@ip-172-31-72-128*:*~/Projects/hpm*$ python3 manage.py 
showmigrations

No module named 'arches.settings_local'

Error attempting to load settings from relative '.settings_local'. 
Attempting 'arches.settings_local' import

Error attempting to load settings from 'arches.settings_local.py'.

No module named 'arches.settings_local'

Traceback (most recent call last):

  File "/usr/lib/python3.8/logging/config.py", line 563, in configure

handler = self.configure_handler(handlers[name])

  File "/usr/lib/python3.8/logging/config.py", line 744, in 
configure_handler

result = factory(**kwargs)

  File "/usr/lib/python3.8/logging/__init__.py", line 1143, in __init__

StreamHandler.__init__(self, self._open())

  File "/usr/lib/python3.8/logging/__init__.py", line 1172, in _open

return open(self.baseFilename, self.mode, encoding=self.encoding)

PermissionError: [Errno 13] Permission denied: 
'/home/ubuntu/Projects/hpm/hpm/arches.log'


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "manage.py", line 30, in 

execute_from_command_line(sys.argv)

  File 
"/home/ubuntu/Projects/ENV/lib/python3.8/site-packages/django/core/management/__init__.py",
 
line 381, in execute_from_command_line

utility.execute()

  File 
"/home/ubuntu/Projects/ENV/lib/python3.8/site-packages/django/core/management/__init__.py",
 
line 357, in execute

django.setup()

  File 
"/home/ubuntu/Projects/ENV/lib/python3.8/site-packages/django/__init__.py", 
line 19, in setup

configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)

  File 
"/home/ubuntu/Projects/ENV/lib/python3.8/site-packages/django/utils/log.py", 
line 76, in configure_logging

logging_config_func(logging_settings)

  File "/usr/lib/python3.8/logging/config.py", line 808, in dictConfig

dictConfigClass(config).configure()

  File "/usr/lib/python3.8/logging/config.py", line 570, in configure

raise ValueError('Unable to configure handler '

ValueError: Unable to configure handler 'file'



And when I check the permissions of the arches.log file it is:

 -rwxr-xr-x 1 root root  22322 Aug 11 14:29 *arches.log*

In the arches.log there is no recent log as to be expected. How should I 
change the permissions for this file?


Thanks again for any answer,

best

A.
Le mardi 11 août 2020 à 12:10:04 UTC-7, ala...@gmail.com a écrit :

> Hi Anais,
>
> Dale reported a similar error in version 4: 
> https://groups.google.com/d/msg/archesproject/gYnmrToi8eE/PUJ-6ys-AQAJ
>
> I'm not sure if the same troubleshooting would apply for v5, but do you 
> have pending migrations to run as Cyrus suggested in that thread? 
>
> Angela
>  
>

-- 
-- 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/b182dfff-77b7-47fa-98ae-3e072e32d091n%40googlegroups.com.


[Arches] Re: Problem with translation files

2020-08-13 Thread Mahmoud Abdelrazek
Hi All, 

Thank you Adam for your help. I tried specifying the extension to "htm" and 
it did work in collecting the text in the homepage (*index.htm*). To 
collect the rest of the text I had to copy the templates from inside arches 
library to the project and then run makemessages again. I will try to test 
the process a few times and then draft a guide for it for the 
documentation. 

Thank you again, 
Best, 
Mahmoud 
On Sunday, August 9, 2020 at 6:13:06 PM UTC+2 Mahmoud Abdelrazek wrote:

> Hi All, 
>
> I am trying to enable a language switcher for an arches implementation. I 
> think similar to here 
>  but 
> for version 5. 
>
> The process is I understand it is as follows: 
>
>1. Include localization tags in the HTML files and surround the text 
>with "trans" tags. #already done by arches
>2. Include the "locale" location in the settings 
>3. Produce the localization files ' .po and .mo ' using "makemessages" 
>command
>4. Include the translation in the localization ' .po ' and then 
>compile it using "compilemessages" command 
>5. Include a language switcher in the page's template similar to the 
>example here 
>
> 
>. 
>6. Set the list of the available languages in the settings file 
>
> I could not produce the localization files. I have tried adding folders to 
> the locale list and tried resiting it to only one directory and then 
> running makemessages but it didn't create any files. I only got back 
> processing 
> locale ru when I tried the Russian language. I have tried both manage.py 
> and django-admin and got the same results. I tried all languages and also 
> nothing was created. 
>
> I feel like there might be something obvious I am missing here. Did anyone 
> come across this issue before? or tried and managed and translated v5 
> successfully? 
>
>
> I have added the switcher to the HTML template and added a list of 
> controlled languages in the settings file. The switcher shows in all the 
> windows and accepts changes (post request is sent successfully)  
>
> However, only the word "search" is translated. I am not sure if this is 
> the expected behaviour or not? How much of Arches is available in other 
> languages by default? Is there a list of supported languages available 
> somewhere?
>
> Thank you all very much for your help. 
> Best, 
> Mahmoud 
>
>
>
>

-- 
-- 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/805b1bcd-632b-48d4-9fb3-6e2a0709c216n%40googlegroups.com.