question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plugins modules required to be packages

See original GitHub issue

I can’t really get slackbot to work with my custom modules at all (I’m on Python 3.5) but I thought I’d document one of the major hurdles I discovered while I wrangle on.

The import hook code is guaranteed to fail if a simple Python module is specified rather than a package. That’s because submodule_search_locations is None in that case. If this is an intended limitation (though I can’t imagine why it would be) it should be documented as such.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
uogbujicommented, Mar 25, 2016

Just for anyone who comes along later, you need to make sure you have an __init__.py as well in the folder you specify, in order to make sure it’s a proper Python package. You also need to make sure it’s in your sys.path (e.g. by proper installation into site-packages or manipulating the PYTHONPATH environment.

1reaction
merquriocommented, Mar 25, 2016

Try just ‘myplugins’ ; let me know if works

On Fri, Mar 25, 2016 at 12:00 PM Jani Karhunen notifications@github.com wrote:

I am stuck on the same thing (Python 3.5.1). I cannot get my own plugins to work (myplugins/myplugin.py), keep getting: AttributeError: module ‘myplugins.myplugin’ has no attribute ‘path’`

Could you please walk me through, what you did to make it work?

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/lins05/slackbot/issues/59#issuecomment-201240356

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating and discovering plugins
Packages can have metadata for plugins described in the Entry points specification. By specifying them, a package announces that it contains a specific...
Read more >
Creating a Package Plugin - Developer's Guide - Drupal
Packages are plugins that implement the PackageBase class. They should reside in your module's /src/Plugin/Package directory.
Read more >
Adding modules and plugins locally - Ansible Documentation
To load standalone local modules automatically and make them available to all playbooks and roles, use the DEFAULT_MODULE_PATH configuration setting or the ...
Read more >
PlugIn Modules | Documentation Center | ABP.IO
simple-plugin-library. You can add ABP Framework packages you need to use in the module. At least, you should add the Volo.Abp.Core package to...
Read more >
ansible.builtin.package module – Generic OS package manager
Requirements . The below requirements are needed on the host that executes this module. Whatever is required for the package plugins specific...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found