GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Error loading the plugin when there is a python file in directory whose name clashes with the dependencies · Issue #1156 · python-mode/python-mode

Error loading the plugin when there is a python file in directory whose name clashes with the dependencies #1156

New issue
Copy link
New issue
Copy link
Open
Open
Error loading the plugin when there is a python file in directory whose name clashes with the dependencies#1156
Copy link

Description

@dagcilibili
dagcilibili
opened on May 20, 2022
Issue body actions

Hi, I was getting the Error detected while processing .../pymode/lint.vim, and looked at the troubleshooting steps which did not resolve the issue (rightfully so); so I looked into the root cause a bit. I realized that, in this case (which, I believe can happen to many), the call from pylama.lint.extensions import LINTERS that pymode/lint.vim does eventually tries to load a python module named "io". However, there is a file named as io.py in the directory I am calling vim from, so the names for the modules clash, and I get an error. Is there a way to setup pymode or vim so that it is robust to this edge case? Thank you very much!

Activity

  1. Drachenfels commented on Feb 17, 2023

    @Drachenfels
    Drachenfels
    on Feb 17, 2023
    More actions

    It's related to pythonpath and fixing it on a side of python-mode is near impossible or would include some hardcore hacking in form of adding/removing stuff to sys.path and etc).

    But there is probably an easy fix for you, relative import: from . import io will fix it, that is the reason why it's recommended to perform 'import X.Y' only on stdlib modules.

    An alternative solution for you would be to use flags of interpret like perhaps: python -P app.py or python -I app.py, this however I doubt would help you or would introduce tons of other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.