attributeerror Questions
2
Solved
I'm trying to code the shortest path finder using Dijkstra's algorithm but it doesn't seem to be working. I can't figure out what the problem is. I'm working on Python 3.5 and following this video....
Heptagonal asked 15/6, 2017 at 14:48
6
Solved
I'm dealing with JSON data which I load into Python dictionaries. A lot of these have optional fields, which then may contain dictionaries, that kind of stuff.
dictionary1 =
{"required":...
Townscape asked 4/2, 2022 at 15:23
2
Solved
I'm working on an project where I have to use the smtplib and email modules in Python 3.4 to send an email.
I'm able to create the email itself and I'm able to connect to the server, but then it ...
Simonetta asked 27/4, 2015 at 15:13
2
Solved
I am running a .ipynb notebook on a Kaggle server.
At the first code cell, when importing modules, specifically cv2_imshow from google.patches as follows,
from google.colab.patches import cv2_imsho...
Gaol asked 7/3, 2023 at 19:27
2
Often when I try using BeautifulSoup to parse a web page, I get a None result from the BeautifulSoup function, or else an AttributeError is raised.
Here are some self-contained (i.e., no internet a...
Automatize asked 26/3, 2023 at 5:6
1
If your question was closed as a duplicate of this, it is because you have some code of the general form
x = X()
# later...
x = x.y()
# or:
x.y().z()
where X is some type that provides y and z met...
Lonesome asked 27/3, 2023 at 0:18
13
I am learning Python on my own. Now I have encountered some problems.
Below is my code which copy from the video who running well.
import datetime
print(type(datetime))
d1 = datetime.datetime.now...
Hemielytron asked 1/6, 2018 at 8:43
2
Solved
I want to convert all the items in the 'Time' column of my pandas dataframe from UTC to Eastern time. However, following the answer in this stackoverflow post, some of the keywords are not known in...
Trophoplasm asked 22/1, 2018 at 18:18
2
Solved
accounts = pd.read_csv('C:/*******/New_export.txt', sep=",", dtype={'number': object})
accounts.columns = ["Number", "F"]
for i, j in accounts["Number"].ite...
Amur asked 4/3, 2019 at 20:25
2
Solved
So I have been writing a code to standardize the elements of a matrix and the function I used is as follows:
def preprocess(Data):
if stdn ==True:
st=np.empty((Data.shape[0],Data.shape[1]))
for ...
Looker asked 17/12, 2016 at 11:34
6
Solved
The following code:
Base = declarative_base()
engine = create_engine(r"sqlite:///" + r"d:\foo.db",
listeners=[ForeignKeysListener()])
Session = sessionmaker(bind = engine)
ses = Session()
class ...
Selfpossession asked 16/5, 2013 at 13:46
6
Solved
I just downloaded pytube (version 11.0.1) and started with this code snippet from here:
from pytube import YouTube
YouTube('https://youtu.be/9bZkp7q19f0').streams.first().download()
which gives th...
Gruver asked 22/11, 2021 at 2:24
2
Solved
I am trying to filter out the dataframe that contains a list of product. However, I am getting the pandas - 'dataframe' object has no attribute 'str' error whenever I run the code.
Here is the line...
Rankin asked 24/7, 2018 at 15:18
10
Solved
In Python I'm getting an error:
Exception: (<type 'exceptions.AttributeError'>,
AttributeError("'str' object has no attribute 'read'",), <traceback object at 0x1543ab8>)...
Schweiz asked 24/6, 2012 at 0:12
5
I am using python and getting this error.
import telegram
telegram.Bot(token = '###############')
When I run this, appears:
"AttributeError: module 'telegram' has no attribute 'Bot'"
Any ideas...
Wire asked 10/10, 2018 at 22:29
3
Solved
I have a problem with AttributeErrors raised in a @property in combination with __getattr__() in python:
Example code:
>>> def deeply_nested_factory_fn():
... a = 2
... return a.invalid_...
Christmastide asked 12/4, 2016 at 13:39
6
I looked for all the "'Tensor' object has no attribute ***" but none seems related to Keras (except for TensorFlow: AttributeError: 'Tensor' object has no attribute 'log10' which di...
Wickham asked 3/7, 2017 at 15:22
16
Solved
How do I check if an object has some attribute? For example:
>>> a = SomeClass()
>>> a.property
Traceback (most recent call last):
File "<stdin>", line 1, in <...
Lemonade asked 4/3, 2009 at 14:45
8
Solved
I've spent half a day trying to figure it out on my own but now I've run out of ideas and googling requests.
So basically what I want is to connect to our Snowflake database using snowflake-connect...
Argos asked 30/6, 2020 at 13:43
9
Solved
I downloaded this code from GitHub.
predicted_id = tf.multinomial(tf.exp(predictions), num_samples=1)[0][0].numpy()
But I get an error that says:
AttributeError: 'Tensor' object has no attribute '...
Zounds asked 16/9, 2018 at 19:9
7
Solved
I was using pyspark on AWS EMR (4 r5.xlarge as 4 workers, each has one executor and 4 cores), and I got AttributeError: Can't get attribute 'new_block' on <module 'pandas.core.internals.blocks'....
Savor asked 2/8, 2021 at 17:29
2
Solved
I've been attempting to fit this data by a Linear Regression, following a tutorial on bigdataexaminer. Everything was working fine up until this point. I imported LinearRegression from sklearn, and...
Alanalana asked 28/7, 2016 at 20:22
3
import spacy
nlp = spacy.load('en_core_web_sm')
**Error:** Traceback (most recent call last):
File "C:\Users\PavanKumar\.spyder-py3\ExcelML.py", line 27, in <module>
nlp = spacy...
Preraphaelite asked 31/5, 2021 at 6:42
3
>import tensorflow
>import tensorflow.contrib
>tensorflow.contrib
module 'tensorflow.contrib' from 'D:\\ProgramData\\Anaconda3\\lib\\site-packages\\tensorflow\\contrib\\__init__.py'
&g...
Overhear asked 15/11, 2017 at 10:30
2
Solved
I need to use a lambda function to do a row by row computation. For example create some dataframe
import pandas as pd
import numpy as np
def myfunc(x, y):
return x + y
colNames = ['A', 'B']
data...
Gimcrackery asked 9/11, 2016 at 11:53
© 2022 - 2024 — McMap. All rights reserved.