These are chat archives for translate/dev

25th
Sep 2017
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 08:12
@phlax Ping! Good morning! :)
phlax
@phlax
Sep 25 2017 08:12
hey!
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 08:13
@phlax , one quick question. I have downloaded the master to have the create_project. How can I install it from source? Because
as far as I know, we still don't have any release with it right?
phlax
@phlax
Sep 25 2017 08:15
yep we dont
you either need to set up a dev environment
or ping @unho and request a release
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 08:18
well I think we can set up a dev environment better
phlax
@phlax
Sep 25 2017 08:18
there are some docs...
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 08:19
ok I'll take a look thanks
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 08:47
@phlax @unho another quick question. I have my version of the local.conf. Should I put it in the pootle/settings directory?
with the name
90-local.conf
for example? This is how it's meant to work?
I even didn't need to rename it, pootle.conf worked ok
ignore this question :)
phlax
@phlax
Sep 25 2017 09:01
@jjmcarrascosa you shouldnt do anything in the pootle/settings directory
old dev docs suggested that was right, but it caused confusion
best thing is to use the existing pootle.conf
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 09:02
ah, sorry
phlax
@phlax
Sep 25 2017 09:02
which will be either VENV/pootle.conf or ~/.pootle/pootle.conf
or both if they are both there
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 09:02
sure
ok yes, thank you
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 10:14
do you know the cause of this error when acessing pootle webpage? (migrate, initdb, everything was run successfully)
BundleError: Cannot find version of <Bundle output=css/common.min.%(version)s.css, filters=[<webassets.filter.cssmin.CSSMin object at 0x7f73d26c7f50>], contents=('css/style.css', 'css/actions.css', 'css/breadcrumbs.css', 'css/buttons.css', 'css/contact.css', 'css/error.css', 'css/auth.css', 'css/magnific-popup.css', 'css/navbar.css', 'css/popup.css', 'css/react-select.css', 'css/tipsy.css', 'css/sprite.css', 'css/select2.css', 'css/select2-pootle.css', 'css/scores.css', 'css/user.css', 'css/welcome.css')>. There is no manifest which knows the version, and it cannot be determined dynamically, because: output target has a placeholder
I have even done pootle collectstatic
phlax
@phlax
Sep 25 2017 10:14
you need to set up the assets
pootle uses webpack
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 10:14
it's not the pootle collectstaiccommand?
phlax
@phlax
Sep 25 2017 10:14
if you are devving front end you want to run it in dev mode...
pootle webpack --dev
there are some docs...
you need npm - the docs dont suggest this but i use http://nvm.sh
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 10:16
thank you very much
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 10:23
@phlax A classic. How do you solve the node / nodejs thing
root@10abce9c7ebe:/home/pootle/pootle/pootle/static/js# pootle webpack --dev
/usr/bin/env: ‘node’: No such file or directory
but
root@10abce9c7ebe:/home/pootle/pootle/pootle/static/js# node
node      node-gyp  nodejs
phlax
@phlax
Sep 25 2017 10:24
use nvm like i said above
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 10:24
ok
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 10:57
is it normal that it stucks here for a lot of time?
   [4] ./vendor/jquery/jquery.js 242 kB {10} [built]
 [244] ./vendor/jquery/jquery.magnific-popup.js 48.2 kB {6} {7} [built]
 [246] ./vendor/jquery/jquery.tipsy.js 15 kB {6} [built]
 [247] ./vendor/spin.js 10.4 kB {6} {7} [built]
 [260] ./vendor/jquery/jquery.serializeObject.js 783 bytes {6} {7} [built]
 [261] ./vendor/jquery/jquery.utils.js 544 bytes {6} {7} [built]
 [340] ./vendor/sorttable.js 17.4 kB {6} [built]
 [354] ./vendor/jquery/jquery.bidi.js 4.33 kB {7} [built]
 [355] ./vendor/jquery/jquery.easing.js 8.1 kB {7} [built]
 [356] ./vendor/jquery/jquery.highlightRegex.js 1.55 kB {7} [built]
 [357] ./vendor/jquery/jquery.history.js 3.67 kB {7} [built]
 [358] ./vendor/levenshtein.js 3.83 kB {7} [built]
 [378] ./editor/mt/providers ^\.\/.*$ 352 bytes {8} [built]
    + 377 hidden modules
phlax
@phlax
Sep 25 2017 10:58
its supposed to do that
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 10:59
ok, i'm here already like 10 minutes waiting :)
phlax
@phlax
Sep 25 2017 10:59
that way if you make changes they are updated immediately
he
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 10:59
yes, that's what I need
phlax
@phlax
Sep 25 2017 11:02
@Johennes seems like there is a js lint error on your PR https://travis-ci.org/translate/pootle/jobs/278638175#L5338
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 11:09
@phlax like 20 min doing that webpack is normal? It starts concerning me :)
phlax
@phlax
Sep 25 2017 11:09
hehe
maybe i didnt explain properly
its supposed to sit running
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 11:10
aaaaaaaaaaah
phlax
@phlax
Sep 25 2017 11:10
try making a change to a js file
and watch what happens
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 11:11
well first I need to check if it works, because I was having an error any time that I tried to access the web
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 11:12
Same thing
BundleError: Cannot find version of <Bundle output=css/common.min.%(version)s.css, filters=[<webassets.filter.cssmin.CSSMin object at 0x7f0c0e001f10>], contents=('css/style.css', 'css/actions.css', 'css/breadcrumbs.css', 'css/buttons.css', 'css/contact.css', 'css/error.css', 'css/auth.css', 'css/magnific-popup.css', 'css/navbar.css', 'css/popup.css', 'css/react-select.css', 'css/tipsy.css', 'css/sprite.css', 'css/select2.css', 'css/select2-pootle.css', 'css/scores.css', 'css/user.css', 'css/welcome.css')>. There is no manifest which knows the version, and it cannot be determined dynamically, because: output target has a placeholder
yes that's what I have done
phlax
@phlax
Sep 25 2017 11:12
hmm
so what i tend to do
make assets
rm -rf pootle/static/js
pootle webpack --dev
it might be tho that you just dont have DEBUG set to True
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 11:14
aaaah probably
make assets fixed it
I didn't execute it it seems
phlax
@phlax
Sep 25 2017 11:15
the dev docs dont say to
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 11:15
ah, probably
phlax
@phlax
Sep 25 2017 11:15
but i know it will always fix the problem
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 11:15
hahaha
phlax
@phlax
Sep 25 2017 11:15
i figure it was to do with debug setting
we should check and update the docs perhaps
Johannes Marbach
@Johennes
Sep 25 2017 12:12
@phlax I'll try to fix this today, sorry.
phlax
@phlax
Sep 25 2017 12:12
np
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 12:26
@phlax Still struggling with webpack :(
root@b3dd370c8880:/home/pootle/pootle/pootle/static/js# npm install
npm WARN package.json pootle@0.0.0 No description
npm WARN package.json pootle@0.0.0 No README data
npm WARN unmet dependency /home/pootle/pootle/pootle/static/js/node_modules/stylelint/node_modules/postcss-less requires postcss@'^
5.2.16' but will load
npm WARN unmet dependency /home/pootle/pootle/pootle/static/js/node_modules/stylelint/node_modules/postcss,
npm WARN unmet dependency which is version 6.0.12
npm WARN unmet dependency /home/pootle/pootle/pootle/static/js/node_modules/stylelint/node_modules/table requires chalk@'^1.1.1' but will load
npm WARN unmet dependency /home/pootle/pootle/pootle/static/js/node_modules/stylelint/node_modules/chalk,
npm WARN unmet dependency which is version 2.1.0
but it doesn't install
root@b3dd370c8880:/home/pootle/pootle/pootle/static/js# pootle webpack
CommandError: webpack executable not found.
Make sure to install it by running `cd /home/pootle/pootle/pootle/static/js && npm install`
probably collectstatics needed before?
phlax
@phlax
Sep 25 2017 12:27
you had it running before
no ?
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 12:27
yes, then I did the rm -rf pootle/static/js
and I broke everything :)
so I had to start again
phlax
@phlax
Sep 25 2017 12:27
ah
my bad
i should have said
rm -rf pootle/assets/js
sorry 8/
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 12:28
aaaah
hahaha don't worry
let me do collectstatics
wtf :(
I can't install webpack executable
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 12:34
oops no, it's installed, but it doesn't find it
phlax
@phlax
Sep 25 2017 12:35
not sure
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 12:35
root@b3dd370c8880:/home/pootle/pootle# pootle webpack
CommandError: webpack executable not found.
Make sure to install it by running `cd /home/pootle/pootle/pootle/static/js && npm install`
root@b3dd370c8880:/home/pootle/pootle# webpack
phlax
@phlax
Sep 25 2017 12:35
you are using root which is not such a good idea
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 12:35
I'm in a docker container
phlax
@phlax
Sep 25 2017 12:35
also before doing anything nvm related
even in a docker container running as root is a bad idea
so before anything nvm related
do nvm use node
nvm is like virtualenv
but for node/npm
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 12:36
aaah, great
phlax
@phlax
Sep 25 2017 12:37
so re running as root
there are a few vectors that are opened up even in docker
esp if you have any volumes mounted into your container
or even worse - if you ran the container as privileged
then root == host root
similar if it can access a bunch of different device nodes
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 13:07
@phlax , ok done, I had a problem with an external volume that was overwritting things
so
now
I can do
rm -rf pootle/assets/js
pootle webpack --dev
right?
phlax
@phlax
Sep 25 2017 13:27
yep
should work
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 13:29
image.png
I get lots of erros with the .js files
phlax
@phlax
Sep 25 2017 13:37
is DEBUG set to True ?
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 13:37
no, let me do it
same :(
phlax
@phlax
Sep 25 2017 13:44
and you have webpack --dev running ?
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 13:45
image.png
phlax
@phlax
Sep 25 2017 13:45
restart the server ?
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 13:46
no way
I don't get the erros without the webpack, but with it - several 404's. It seems like it's looking for them anyway ignoring the webpack
phlax
@phlax
Sep 25 2017 13:48
ls pootle/assets
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 13:50
root@e362dbdedc22:/home/pootle/pootle# ls pootle/assets
css  favicon  fonts  images  translations
phlax
@phlax
Sep 25 2017 13:50
wierd
ah
i know
echo "from django.conf import settings; settings.ASSETS_DEBUG" | pootle shell
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 13:54
I should do this before starting everything
after?
phlax
@phlax
Sep 25 2017 13:54
check that setting
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 13:54
it gives false
phlax
@phlax
Sep 25 2017 13:54
set it to True
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 13:55
root@e362dbdedc22:/home/pootle/pootle# echo "from django.conf import settings; settings.ASSETS_DEBUG" | pootle shell
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> False

>>> root@e362dbdedc22:/home/pootle/pootle#
phlax
@phlax
Sep 25 2017 13:55
and then restart your server
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 13:57
ok now True
root@e362dbdedc22:/home/pootle/pootle# echo "from django.conf import settings; settings.ASSETS_DEBUG" | pootle shell
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> True

>>> root@e362dbdedc22:/home/pootle/pootle#
phlax
@phlax
Sep 25 2017 13:58
did you restart the server ?
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 13:58
Yes, but no way
phlax
@phlax
Sep 25 2017 13:59
works now
just caching still i think
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 14:00
weird, I got from you
the debug lines in the server
probably is doing cache to me?
phlax
@phlax
Sep 25 2017 14:00
i think so
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 14:00
now it's working
phlax
@phlax
Sep 25 2017 14:00
i still see js errors on the page i had alredy visited
we should defo add something in the dev docs
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 14:01
yes but it works now at least
So if I change now the front end
I will be able to see the changes
right?
phlax
@phlax
Sep 25 2017 14:02
should do - yep
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 14:07
So question
in /templates/
I should be able to change for example
welcome.html
and see the changes?
phlax
@phlax
Sep 25 2017 14:08
yep
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 14:08
I have just discovered
that eeverything was cache
issues
the last ones I mean
yes, I can change it but in an incognito window
ok, thank you! finally I have it :)
phlax
@phlax
Sep 25 2017 14:09
cool
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 14:12
I think anyway is somehow broken
image.png
  File "/home/pootle/pootle/pootle/apps/accounts/forms.py", line 32, in login
    raise RuntimeError(_("An error occurred logging you in. Please "
RuntimeError: An error occurred logging you in. Please contact your system administrator
[2017-09-25T14:13:49]   "POST /accounts/login/?next=%2F HTTP/1.1" 500 25032
2017-09-25 14:13:49,485 ERROR "POST /accounts/login/?next=%2F HTTP/1.1" 500 25032
phlax
@phlax
Sep 25 2017 14:15
not sure on that - it does some error which is normally swallowed by middleware
might be that
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 14:18
uhmmm well everything is given a HTTP 500
giving*
phlax
@phlax
Sep 25 2017 14:20
seems ok to me
but im not logged in
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 14:21
try to log in or sign up
500 everywhere
phlax
@phlax
Sep 25 2017 14:23
you need to track the source of the 500
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 14:25
I remember having something like this beucase of the email server
phlax
@phlax
Sep 25 2017 14:26
yep
defo a possibile cause
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 14:30
GOT IT
yes, the email server
Hooraaaay
phlax
@phlax
Sep 25 2017 14:31
cool
Jose J. Martinez
@jjmcarrascosa
Sep 25 2017 14:41
Ok, thank you, that was a good beginning. The cache makes a little bit difficult to work with it though
I need to close the browser everytime, CNTRL+F5
doesn't work
neither CNTRL SHIFT R
nothing
only closing an incognito and opening again
But for today enough. Thank you as always for your help I couldn't have done it without you. Have a great day!