JamFfm / cbpi4-LCDisplay

This is the LCDisplay for CraftBeerPi4
GNU General Public License v3.0
2 stars 2 forks source link

Cant load plugin #5

Open vaughnlfisher opened 3 years ago

vaughnlfisher commented 3 years ago

Hi Followed the installation instructions on - https://craftbeerpi.gitbook.io/craftbeerpi4/development#4-install-your-plugin-locally

I cant seem to get it to load, see below!

2021-07-20:08:57:45,986 ERROR [plugin_controller.py:58] FAILED to load plugin LCDisplay 2021-07-20:08:57:45,986 ERROR [plugin_controller.py:59] No module named 'LCDisplay.RPLCD'

Thanks for your help.

JamFfm commented 3 years ago

There is the folder RPLCD missing. Put the folder with everything in there in the same directory like the file init.py. Hope this will help.

yours Jan

avollkopf commented 3 years ago

A modification of the setup.py script should solve the issue:

  1. Add also find_packages to the import of setuptools
  2. replace packages=['LCDisplay'], with packages=find_packages(), (or uncomment the original and add the new)

This should do the trick and you can leave all the scripts in the subfolder.

Regards, Alex


from setuptools import setup, find_packages

# read the contents of your README file
from os import path
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
    long_description = f.read()

setup(name='LCDisplay',
      version='0.0.1',
      description='CraftBeerPi4 LCD Plugin',
      author='Jan Battermann',
      author_email='jan.battermann@t-online.de',
      url='https://github.com/JamFfm/cbpi4-LCDisplay',
      license='GPLv3',
      packages=find_packages(),
      include_package_data=True,
      package_data={
        # If any package contains *.txt or *.rst files, include them:
      '': ['*.txt', '*.rst', '*.yaml'],
      'LCDisplay': ['*','*.txt', '*.rst', '*.yaml']},
      #packages=['LCDisplay'],
        install_requires=[
            'cbpi>=4.0.0.33',
      ],
      long_description=long_description,
      long_description_content_type='text/markdown'
     )
JamFfm commented 3 years ago

Thanks, setup.py is updated. I too updated the installation description in Readmy of the repo.