attributeerror Questions

6

i want to run this code but i can't and received this error. also i downloaded pandas package. import pandas data = { "Day": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], "Visitors": [18, 26, 18, 18, ...
Laurin asked 3/4, 2020 at 9:44

3

Solved

When I run the below code, it gives me an error saying that there is attribute error: 'float' object has no attribute 'split' in python. I would like to know why this error comes about. def text...
Tannertannery asked 10/10, 2018 at 9:26

20

Solved

I have two python modules: a.py import b def hello(): print "hello" print "a.py" print hello() print b.hi() b.py import a def hi(): print "hi" When I run a.py, I get: AttributeEr...
Shanghai asked 8/8, 2009 at 23:12

3

What I am trying to do is to define a function in a custom module on Google Colab. I created a *.py file to define the function. It is /content/gdrive/My Drive/Colab/myfunc.py Then I created a ...
Tweedsmuir asked 16/3, 2019 at 4:51

22

I just installed Python 3.6.1 for MacOS X When I attempt to run the Console(or run anything with Python3), this error is thrown: AttributeError: module 'enum' has no attribute 'IntFlag' $ /Libr...
Subclinical asked 30/3, 2017 at 17:37

4

Solved

I'm using sci-kit learn linear regression algorithm. While scaling Y target feature with: Ys = scaler.fit_transform(Y) I got ValueError: Expected 2D array, got 1D array instead: After that...
Hose asked 11/12, 2018 at 12:10

6

Solved

My API is being built to allow developers to extend it's functionality. My plan is to do this by providing an "extensions" directory where they can drop in Blueprints and they will be dynamically l...
Gallaway asked 24/10, 2014 at 14:38

3

Solved

I have a dataframe that looks like this df [output]: date time 2020-02-28 00:30:45 2020-02-28 00:30:45 2020-03-09 00:21:06 2020-03-09 00:21:06 2020-03-09 00:21:06 with df.time.dtype [output]: dt...
Helfant asked 9/6, 2020 at 11:24

6

Could someone please tell me what I may be doing wrong. I keep getting this message when I run my python code: import random foo = ['a', 'b', 'c', 'd', 'e'] random_item = random.choice(foo) pr...
Organogenesis asked 5/9, 2014 at 23:45

6

Solved

I keep getting different attribute errors when trying to run this file in ipython...beginner with pandas so maybe I'm missing something Code: from pandas import Series, DataFrame import pa...
Malmsey asked 15/10, 2013 at 22:32

2

Solved

I have installed LDA plibrary (using pip) I have a very simple test code (the next two rows) import lda print lda.datasets.load_reuters() But i keep getting the error AttributeError: 'module' ob...
Barfield asked 23/7, 2016 at 0:58

5

I am having many troubles trying to start training my model (a DCGAN). It is giving me the error: 'tuple' object has no attribute 'layer' I read that this could be due to having both the TensorFlo...
Stines asked 27/9, 2019 at 16:7

4

Solved

As the title says. When I execute the converted python file (the .exe) I get the following output: Traceback (most recent call last): File "background.py", line 10, in <module> File "site...
Cornemuse asked 19/4, 2018 at 8:30

8

Solved

I am creating a method in a class in a module mod1 and calling it as follows: class blahblah: def foobar(self, bvar, **dvar) //// return dvar And calling it as: obj1 = mod1.blahblah() dvar1 ...
Coverage asked 26/10, 2012 at 21:30

2

I am trying to find a way to access the plist file: /Library/Preferences/com.apple.iPod.plist to access the serial numbers in it. Here is my current code-- import os import plistlib fileName=os....
Brita asked 5/9, 2018 at 3:20

2

Solved

i always met one problem, when I scraping one web page. AttributeError: ResultSet object has no attribute 'find'. You're probably treating a list of items like a single item. Did you call find_a...
Jacquetta asked 27/2, 2018 at 6:46

2

Solved

I have a problem with list within a class in python. Here's my code : class Residues: def setdata(self, name): self.name = name self.atoms = list() a = atom C = Residues() C.atoms.append(a) ...
Proclitic asked 17/10, 2012 at 16:26

2

I was trying to implement a pytorch framework on CNN. I'm sure the code is right because it's from a tutorial and it works when I ran it on Jupyter Notebook on GoogleDrive. But when I tried to lo...
Corbel asked 6/8, 2021 at 10:4

1

I can't access the helpers of elasticsearch while trying to push data in bulk mode. Package installed : pip freeze elasticsearch==5.3.0 When in my code I try to call this method : import elasti...
Hatch asked 9/5, 2017 at 13:24

1

Solved

I need to translate the following code from PyQt5 (It works there) to PyQt6: self.setWindowFlags(Qt.FramelessWindowHint) This is the error: AttributeError: type object 'Qt' has no attribute ...
Crete asked 28/10, 2021 at 1:45

3

Solved

I use Regex to retrieve certain content from a search box on a webpage with selenium.webDriver. searchbox = driver.find_element_by_class_name("searchbox") searchbox_result = re.match(r"^.*(?=(\())...
Caudell asked 21/6, 2015 at 10:53

2

Solved

I am trying to run my neural network in colab.research page, but I am still getting error AttributeError: module 'tensorflow' has no attribute 'optimizers' at this line: opt = tensorflow.optimizer...

1

while using th epython library turtle i am getting the error "error" AttributeError module ColabTurtle.Turtle has no attribute undo "code" import ColabTurtle.Turtle as t t.init...
Moravian asked 7/6, 2021 at 4:51

2

I've run into this issue while using the jira library for python. Despite setting the appropriate parameters for basic auth, I get the following: Exception ignored in: <bound method Magic.del o...
Greenock asked 5/10, 2020 at 17:50

6

Solved

I just set up the VS Code with all the Python extensions. Python version is 3.8.3 through Anaconda. The interpreter is venv. When I run this code import matplotlib.pyplot as plt An error shows - E...
Pandanus asked 10/10, 2020 at 7:33

© 2022 - 2024 — McMap. All rights reserved.