Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#14058 closed defect (fixed)

Trac detected an internal error: AttributeError: 'Environment' object has no attribute 'get_htdocs_dir'

Reported by: anonymous Owned by: Ryan J Ollos
Priority: highest Component: ThemeEnginePlugin
Severity: critical Keywords:
Cc: Trac Release: 1.4

Description

On admin/admin/theme/advanced have error

Trac detected an internal error:
AttributeError: 'Environment' object has no attribute 'get_htdocs_dir'
File "/venvp27/lib/python2.7/site-packages/trac/web/main.py", line 639, in dispatch_request          
  dispatcher.dispatch(req)
File "/venvp27/lib/python2.7/site-packages/trac/web/main.py", line 250, in dispatch          
  resp = chosen_handler.process_request(req)
File "/venvp27/lib/python2.7/site-packages/trac/admin/web_ui.py", line 104, in process_request          
  resp = provider.render_admin_panel(req, cat_id, panel_id, path_info)
File "/venvp27/lib/python2.7/site-packages/themeengine/admin.py", line 163, in render_admin_panel          
  theme_css_file = os.path.join(self.env.get_htdocs_dir(), 'theme.css')
        

  Downloading TracThemeEngine-2.2.4-py2-none-any.whl (152 kB)
     |################################| 152 kB 3.1 MB/s 
Requirement already satisfied: Trac in ./.venvp27/lib/python2.7/site-packages (from TracThemeEngine) (1.4.3)
Requirement already satisfied: setuptools<45,>=0.6 in ./.venvp27/lib/python2.7/site-packages (from Trac->TracThemeEngine) (44.1.1)
Requirement already satisfied: jinja2>=2.9.3 in ./.venvp27/lib/python2.7/site-packages (from Trac->TracThemeEngine) (2.11.3)
Requirement already satisfied: MarkupSafe>=0.23 in ./.venvp27/lib/python2.7/site-packages (from jinja2>=2.9.3->Trac->TracThemeEngine) (1.1.1)
Installing collected packages: TracThemeEngine
Successfully installed TracThemeEngine-2.2.4

Trac 1.4.3

Attachments (0)

Change History (14)

comment:1 Changed 3 years ago by anonymous

admin/admin/theme/custom this same admin/admin/theme/theme - empty white site

comment:2 Changed 3 years ago by Ryan J Ollos

Hmmm, this issue should have been fixed in r18326.

comment:3 Changed 3 years ago by Ryan J Ollos

In 18452:

ThemeEnginePlugin: Release version 2.3.0

Refs #14058.

comment:4 Changed 3 years ago by Ryan J Ollos

Owner: changed from Olemis Lang to Ryan J Ollos
Status: newaccepted

Published pypi:TracThemeEngine/2.3.0. Please try that version.

comment:5 Changed 3 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

comment:6 Changed 3 years ago by anonymous

I reinstaled, restarted, upgraded to new and this same error.

comment:7 Changed 3 years ago by Ryan J Ollos

Please share the latest error message so we can compare traceback line numbers with the codebase. Please share pip list.

comment:8 Changed 3 years ago by anonymous

Error is this same like on 1st post.

Package                            Version
---------------------------------- ------------
Babel                              2.9.1
backports-abc                      0.5
backports.functools-lru-cache      1.6.4
backports.shutil-get-terminal-size 1.0.0
BasicThemeEditorPlugin             0.1
BlueFlatTheme                      1.1.0.dev0
cycler                             0.10.0
decorator                          4.4.2
enum34                             1.1.10
ExtendedVersionPlugin              1.0.dev0
ez-setup                           0.9
futures                            3.3.0
Genshi                             0.7.5
ipykernel                          4.10.1
ipython                            5.10.0
ipython-genutils                   0.2.0
Jinja2                             2.11.3
jupyter-client                     5.3.5
jupyter-core                       4.6.3
kiwisolver                         1.1.0
MarkupSafe                         1.1.1
matplotlib                         2.2.5
MultiProjectBacklog                0.5.0.dev0
numpy                              1.16.6
pathlib2                           2.3.5
pexpect                            4.8.0
pickleshare                        0.7.5
pip                                20.3.4
prompt-toolkit                     1.0.18
ptyprocess                         0.7.0
Pygments                           2.5.2
pyparsing                          2.4.7
python-dateutil                    2.8.1
pytz                               2021.1
pyzmq                              19.0.2
scandir                            1.10.0
setuptools                         44.1.1
simplegeneric                      0.8.1
simplejson                         3.17.5
singledispatch                     3.6.2
six                                1.16.0
sqlite3                            0.0.0
subprocess32                       3.5.4
Tkinter                            0.0.0
tornado                            5.1.1
Trac                               1.4.3
trac-github                        2.3
Trac-jsGantt                       1.2.0.0.dev0
trac-WorkflowActionButtons         0.2
TracAccountManager                 0.5.0
TracBacklog                        0.5.1.dev1
TracChangeLog                      0.5
TracCrystalXTheme                  1.1
TracFullBlog                       0.2.0
TracIniAdminPanel                  1.4.1
TracMenus                          0.3.0
TracMigratePlugin                  0.12.0.5
TracNewsFlash                      1.0.3
TracSimpleMultiProject             0.7.4
TracTags                           0.12.1
TracThemeEngine                    2.3.0
TracTocMacro                       12.0.0
TracVote                           0.7.0
TracWikiAutoComplete               1.4
TracWorkflowAdmin                  0.12.0.6
TracWysiwyg                        0.12.0.7
traitlets                          4.3.3
wcwidth                            0.2.5
wheel                              0.36.2

comment:9 in reply to:  8 Changed 3 years ago by Ryan J Ollos

Replying to anonymous:

Error is this same like on 1st post.

Then you have an installation problem, because line 163 in the version 2.3.0 is not the same as shown in your traceback: themeengineplugin/tags/themeengine-2.3.0/themeengine/admin.py@:180-183#L163.

comment:10 Changed 3 years ago by Ryan J Ollos

Seems to be a packaging problem. I pushed 2.3.1.

comment:11 Changed 3 years ago by Ryan J Ollos

In 18454:

ThemeEnginePlugin: Release version 2.3.1

Version 2.3.0 had a packaging problem.

Refs #14058.

comment:12 Changed 3 years ago by anonymous

Confirming that working ok now.

comment:13 Changed 3 years ago by anonymous

But.. not resolved around tags. Tags are not listed, when trying search tags have in combolist tag as AttributeError: 'Environment' object has no attribute 'get_htdocs_dir' then can search this error as row

comment:14 in reply to:  13 Changed 3 years ago by Ryan J Ollos

Replying to anonymous:

But.. not resolved around tags. Tags are not listed, when trying search tags have in combolist tag as AttributeError: 'Environment' object has no attribute 'get_htdocs_dir' then can search this error as row

Are you referring to a problem with TagsPlugin? I'm unsure how tags relate to ThemeEnginePlugin. Please provide a full traceback or report the issue to the appropriate plugin.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.