GithubHelp home page GithubHelp logo

Imports broken in python3 about python-rake HOT 15 CLOSED

fabianvf avatar fabianvf commented on September 27, 2024
Imports broken in python3

from python-rake.

Comments (15)

jkterry1 avatar jkterry1 commented on September 27, 2024

Still doesn't work:

justin@Justin:~/Documents$ sudo pip3 install python-rake -U
The directory '/home/justin/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/justin/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting python-rake
  Downloading python-rake-1.1.2.tar.gz
Installing collected packages: python-rake
  Found existing installation: python-rake 1.1.1
    Uninstalling python-rake-1.1.1:
      Successfully uninstalled python-rake-1.1.1
  Running setup.py install for python-rake ... done
Successfully installed python-rake-1.1.2
justin@Justin:~/Documents$ ipython
Python 3.5.2 (default, Nov 17 2016, 17:05:23) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import RAKE

In [2]: RAKE.SmartStopList()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-2-82f4c6d727de> in <module>()
----> 1 RAKE.SmartStopList()

AttributeError: module 'RAKE' has no attribute 'SmartStopList'

In [3]: RAKE.smart_stop_list()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-3-7195b3b7f0a5> in <module>()
----> 1 RAKE.smart_stop_list()

AttributeError: module 'RAKE' has no attribute 'smart_stop_list'

In [4]: quit()

from python-rake.

fabianvf avatar fabianvf commented on September 27, 2024

Oh woops, guess it closed automatically when I merged the PR. I refactored it like you asked, so it's back to the SmartStopList, FoxStopList naming...

I'm really stumped here, it's working for me in python2 and python3

from python-rake.

jkterry1 avatar jkterry1 commented on September 27, 2024

from python-rake.

fabianvf avatar fabianvf commented on September 27, 2024

I've tested it in python 2.7 and python 3.5, with ipython + regular python, in and out of virtual environments, and I can't replicate this failure. Can you give me the output of

import RAKE

dir(RAKE)

Really want to get to the bottom of this, this behavior doesn't make sense to me.

from python-rake.

jkterry1 avatar jkterry1 commented on September 27, 2024

Uninstalling and reinstalling via pip fixed it. It looks like something broke creatively during the pip upgrade; I have no idea what but it affected multiple computers for me and my coworkers. I don't know if you might want to but a small note in the readme about the bad upgrade or if I should message pip or what.

from python-rake.

jkterry1 avatar jkterry1 commented on September 27, 2024

Can you close it? it won't let me.

from python-rake.

fabianvf avatar fabianvf commented on September 27, 2024

Oh awesome! Thanks for the update, glad to know it's working. Was starting to feel crazy.

from python-rake.

borodache avatar borodache commented on September 27, 2024

Hi,
I have the same problem with PyCharm. I don't have this issue on Jupyter Notebook.
uninstall and install didn't do any help.

for this code:

import RAKE

print(dir(RAKE))

The output is:

['RAKE', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__']
['RAKE', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__']

Best,
Eli

from python-rake.

jkterry1 avatar jkterry1 commented on September 27, 2024

from python-rake.

borodache avatar borodache commented on September 27, 2024

python-rake is version 1.4.5

from python-rake.

jkterry1 avatar jkterry1 commented on September 27, 2024

from python-rake.

borodache avatar borodache commented on September 27, 2024

Hi,
I am not sure what you meant by specifics, but when I looked into the about of the PyCharm I got this information:

PyCharm 2018.3.5
Build #PC-183.5912.18, built on February 26, 2019

JRE: 1.8.0_152-release-1343-b28 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

from python-rake.

borodache avatar borodache commented on September 27, 2024

An update: it must be something stupid with configuration when I open the same file from other project and run it, I get the same out print, but I can press ctrl + click and get inside the Rake library.

from python-rake.

borodache avatar borodache commented on September 27, 2024

Any idea?

from python-rake.

jkterry1 avatar jkterry1 commented on September 27, 2024

from python-rake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.