audour opened a new issue #16613:
URL: https://github.com/apache/superset/issues/16613


   Running `pybabel extract -F superset/translations/babel.cfg -o 
superset/translations/messages.pot -k _ -k __ -k t -k tn -k tct .` as suggested 
within 
[CONTRIBUTING.md#translating](https://github.com/apache/superset/blob/master/CONTRIBUTING.md#translating)
 is not working for me.
   
   ### Expected results
   
   The template file `superset/translations/messages.pot` is updated with 
current application strings.
   
   ### Actual results
   
   * I get an error `NameError: name 'SQLLAB_TIMEOUT' is not defined`.
   * `messages.pot` is emptied
   
   #### How to reproduce the bug
   
   Follow 
[CONTRIBUTING.md#extracting-new-strings-for-translation](https://github.com/apache/superset/blob/master/CONTRIBUTING.md#extracting-new-strings-for-translation)
  
   
   ### Environment
   
   - superset version: `1.3.0`
   - python version: `3.8.10`
   - pybabel version: `2.9.1`
   
   ### Checklist
   
   - [ x ] I have checked the superset logs for python stacktraces and included 
it here as text if there are any.
   - [ x ] I have reproduced the issue with at least the latest released 
version of superset.
   - [ x ] I have checked the issue tracker for the same issue and I haven't 
found one similar.
   
   ### Additional context
   
   Full logs:
   
   ```
   $ pybabel extract -F superset/translations/babel.cfg -o 
superset/translations/messages.pot -k _ -k __ -k t -k tn -k tct .
   extracting messages from superset/__init__.py
   extracting messages from superset/app.py
   extracting messages from superset/cli.py
   extracting messages from superset/config.py
   extracting messages from superset/constants.py
   extracting messages from superset/dataframe.py
   extracting messages from superset/errors.py
   extracting messages from superset/exceptions.py
   extracting messages from superset/extensions.py
   extracting messages from superset/forms.py
   extracting messages from superset/jinja_context.py
   extracting messages from superset/legacy.py
   extracting messages from superset/result_set.py
   extracting messages from superset/schemas.py
   extracting messages from superset/sql_lab.py
   Traceback (most recent call last):
     File "/home/admin/superset_translation/venv/bin/pybabel", line 8, in 
<module>
       sys.exit(main())
     File 
"/home/admin/superset_translation/venv/lib/python3.8/site-packages/babel/messages/frontend.py",
 line 929, in main
       return CommandLineInterface().run(sys.argv)
     File 
"/home/admin/superset_translation/venv/lib/python3.8/site-packages/babel/messages/frontend.py",
 line 853, in run
       return cmdinst.run()
     File 
"/home/admin/superset_translation/venv/lib/python3.8/site-packages/babel/messages/frontend.py",
 line 481, in run
       for filename, lineno, message, comments, context in extracted:
     File 
"/home/admin/superset_translation/venv/lib/python3.8/site-packages/babel/messages/extract.py",
 line 149, in extract_from_dir
       for message_tuple in check_and_call_extract_file(
     File 
"/home/admin/superset_translation/venv/lib/python3.8/site-packages/babel/messages/extract.py",
 line 207, in check_and_call_extract_file
       for message_tuple in extract_from_file(
     File 
"/home/admin/superset_translation/venv/lib/python3.8/site-packages/babel/messages/extract.py",
 line 243, in extract_from_file
       return list(extract(method, fileobj, keywords, comment_tags,
     File 
"/home/admin/superset_translation/venv/lib/python3.8/site-packages/babel/messages/extract.py",
 line 325, in extract
       for lineno, funcname, messages, comments in results:
     File 
"/home/admin/superset_translation/venv/lib/python3.8/site-packages/babel/messages/extract.py",
 line 487, in extract_python
       value = eval(code, {'__builtins__': {}}, {})
     File "<string>", line 2, in <module>
   NameError: name 'SQLLAB_TIMEOUT' is not defined
   ```
   
   Linked issue: https://github.com/apache/superset/issues/16550


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to