Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "attributeerror"
-
I kept getting the same AttributeError like 15 times in a row and picked up my graduation rubber ducky and screamed "I DONT FUCKING KNOW"1
-
How deep does the rabbit hole go?
Problem: Convert numpy array containing an audio time series to a .wav file and save on disk
Error 1:
Me: pip install "stupid package"
Console: Can't pip, behind a proxy
Me: Finds workaround after several minutes
Error 2:
Conversion works, but audio file on disk doesn't work
Encoding Error only works with array of ints not floats
BUT I NEED IT TO BE FLOATS
Looks for another library
scikits.audiolab <- should work
Me: pip --proxy=myproxy:port install "this shit"
Command Line *spits back huge error*
Googles error <- You need to install this package with a .whl file
Me: Downloads .whl file <- pip install "filename".whl
Command Line: ERROR: scikits.audiolab-0.11.0-cp27-cp27m-win32.whl is not a supported wheel on this platform.
Googles Error <- Need to see supported file formats
Me: python -c "import pip; print(pip.pep425tags.get_supported())"
Console: AttributeError: module 'pip' has no attribute 'pep425tags'
Googles Error <- Use another command for pip v10
Me: python -c "import pip._internal; print(pip._internal.pep425tags.get_supported())"
Console: complies
Me: pip install "filename".whl
Console: complies
Me: *spends 30 minutes to find directory where I should paste .dll file*
Finds Directory (was hidden btw), pastes file
Me: Runs .py file
Console: from version import version as _version ModuleNotFoundError: No module named 'version'
Googles Error <- Fix is: "just comment out the import statement"
Me: HAHAHAHAHAHA
Console: HAHAHAHAHA
Unfortunately this shit still didn't work after two hours of debugging, lmao fuck this7 -
Traceback (most recent call last):
File "me.py", line 1, in <module>
AttributeError: 'Dave_Elec' object has no attribute 'social'1 -
Well Django, I think I've fucking HAD IT WITH YOUR STUPID FUCKING SHIT ALREADY.
./manage.py shell
In [1]: from inventory.models import ProductLine
In [2]: ProductLine
Out[2]: inventory.models.ProductLine
In [3]: ProductLine.objects
Out[3]: <django.db.models.manager.Manager at 0x7f03e23017b8>
SO WHY IN THE FUCKING FUCK DO I GET
"""
, in ProductLineViewSet
queryset = ProductLine.objects.all()
AttributeError: type object 'ProductLine' has no attribute 'objects'
"""
FUCK ME
I hope I just FORGET I am a programmer, wake up tomorrow free to go work at fucking McDonalds and die in mediocritity anyway. FIANLYL Get to catch up on fucking work and I have to diagnose this inane fuckign django model problem that I dont fucking see anywhere on google, SO, etc right now
Best I can find are all like "You've probably defined something else called <model class name> in that file." But Grep and I sure as fucking tits can't find it!!!!!
Time to fucking make an exact copy of everything but change it to ProductLine2 and watch it all work perfectly fucking hell am I really this stupid or am I going to eventually find a bug after hours of GETTING FUCKING NO WHERE OMN THE STRUPIDEST FUCKING SHUIT IVE EVER SEEN FUCK ME7 -
Has anyone else used the Decimal module in python?
And if so do you know why it returns
"AttributeError: type object 'decimal.Decimal' has no attribute 'power'"?
According to the documentation
https://docs.python.org/3/library/...
...theres a power() function.
Doing
decimal.power()
Decimal.power()
power(x, y)
No matter how I call it, it always returns an error indicating power() doesn't exist and I'm scratching my head.4