Problem Description
We are developing a SENAITE extension named SENAITE .helloworld, but we are encountering issues with the extension not loading correctly in a Docker environment.
Environment Information
- SENAITE Version: 2.6.0
- Deployment Method: Docker (senaite/senaite:v2.6.0)
- Operating System: Windows
- Extension Name: SENAITE .helloworld
Project Structure
d:\Projects\SENAITE \
├── docker-compose.yml
├── setup.py
└── src/
└── SENAITE /
├── __init__.py
└── helloworld/
├── __init__.py
├── configure.zcml
├── profiles/
│ └── default/
│ ├── metadata.xml
│ └── registry.xml
└── SENAITE .helloworld.egg-info/
Configuration Files
docker-compose.yml
services:
instance1:
environment:
- PLONE_DEVELOP=src/SENAITE /helloworld
- PLONE_PROFILES=senaite.lims:default senaite.storage:default SENAITE .helloworld:default
custom.cfg (inside container)
[buildout]
extends = buildout.cfg
develop += src/SENAITE /helloworld
eggs += senaite.storage
[plonesite]
profiles += senaite.lims:default
senaite.storage:default
SENAITE .helloworld:default
Attempted Solutions
- Container Rebuild: Used
docker-compose build --no-cache
- Manual Buildout: Executed
/usr/local/bin/buildout -c custom.cfg inside container
- File Structure Verification: Confirmed all necessary
__init__.py files exist
- Configuration Check: Verified
configure.zcml and profile configurations are correct
- Cleanup Duplicate Files: Removed conflicting setup.py files
Current Status
- ✅ SENAITE system running normally (http://localhost:8081/senaite)
- ✅ senaite.storage extension successfully loaded
- ❌ SENAITE .helloworld extension not visible in management interface
- ✅ buildout process completed without errors
- ✅ Container logs show
Develop: '/home/senaite/senaitelims/src/SENAITE /helloworld'
Specific Issues
- Python Import Failure:
ImportError: No module named SENAITE .helloworld
- Extension Not Visible: Extension not shown in SENAITE management interface installed products
- Profile Not Loaded: Extension's GenericSetup profile seems not to be recognized
Questions Needing Help
- Package Structure: Is our package structure correct? Do we need special namespace configuration?
- Docker Integration: Do development mode extensions require special configuration in Docker environment?
- Debugging Methods: What methods are available to debug the extension loading process and view detailed error information?
- Best Practices: What are the recommended project structure and configuration approaches for custom extension development?
Related File Contents
setup.py
from setuptools import setup, find_packages
setup(
name="SENAITE .helloworld",
version="1.0.0",
packages=find_packages("src", exclude=["ez_setup"]),
package_dir={"": "src"},
namespace_packages=["SENAITE "],
install_requires=[
"senaite.lims>=2.6.0",
],
entry_points="""
[z3c.autoinclude.plugin]
target = plone
""",
)
src/SENAITE /helloworld/init.py
from bika.lims.api import get_request
from zope.i18nmessageid import MessageFactory
_ = MessageFactory('SENAITE .helloworld')
def initialize(context):
"""Initializer called when used as a Zope 2 product."""
pass
Contact Information
If you need more information or have any suggestions, please contact us. We greatly appreciate the community's help!
Note: We have successfully integrated the senaite.storage extension, so the basic environment should be correct. The issue likely lies in the specific configuration of our custom extension.
Problem Description
We are developing a SENAITE extension named
SENAITE .helloworld, but we are encountering issues with the extension not loading correctly in a Docker environment.Environment Information
Project Structure
Configuration Files
docker-compose.yml
custom.cfg (inside container)
Attempted Solutions
docker-compose build --no-cache/usr/local/bin/buildout -c custom.cfginside container__init__.pyfiles existconfigure.zcmland profile configurations are correctCurrent Status
Develop: '/home/senaite/senaitelims/src/SENAITE /helloworld'Specific Issues
ImportError: No module named SENAITE .helloworldQuestions Needing Help
Related File Contents
setup.py
src/SENAITE /helloworld/init.py
Contact Information
If you need more information or have any suggestions, please contact us. We greatly appreciate the community's help!
Note: We have successfully integrated the senaite.storage extension, so the basic environment should be correct. The issue likely lies in the specific configuration of our custom extension.