import pygame
print pygame.ver
throws the following exception
AttributeError: 'module' object has no attribute 'ver'
I don't know how to fix it. I should have pygame installed but it still shows this exception.
The attribute is pygame.version.ver, so you need to use:
import pygame
print(pygame.version.ver)
Related
I am running a script which needed transposer, I import that module, but it got this error:
....line 184, in jj=transposer.transpose(i=args.v+ '/vcf_to_str/'+args.o+"TransposedStruct.str",d="\t",)
AttributeError: module 'transposer' has no attribute 'transpose'
Would you please help me to solve that? Thanks
I keep trying to run a bit of python on mac terminal, and I'm hit with the following error: "TypeError: 'module' object is not callable"
Reference code:
import re
import pathlib as Path
mypath = Path('users/pranav/Desktop/sir/samplenames.txt')
Could someone break down the error for me and explain what I should do to fix it?
I also tried to fix it using sys, however, before I could even work through it I was returned an error stating: AttributeError: 'list' object has no attribute 'dirname'
Code w/ sys:
import sys
print(sys.path.dirname())
import re
import pathlib as Path
mypath = Path('/users/pranav/Desktop/sir/samplenames.txt')
Any help would be greatly appreciated
from pathlib import Path
SCR_DIR = 'C:\\users\\pranav\\Desktop\\sir'
mypath = Path(SRC_DIR, "samplenames.txt")
I am trying to import a csv dataset using this:
full_data_stats = tfdv.generate_statistics_from_csv(data_location='PATH.csv')
It's giving me
AttributeError: module 'tfx_bsl.arrow.array_util' has no attribute 'ValueCounts' [while running 'GenerateStatistics/RunStatsGenerators/GenerateSlicedStatisticsImpl/TopKUniquesStatsGenerator/ToTopKTuples']
I am trying to use
model_S = statespace.sarimax.SARIMAX(df['lnpd'], trend='n', order=(12,1,12), seasonal_order=(1,1,1,12))
Shows error:
AttributeError: 'module' object has no attribute 'sarimax'
I just updated statsmodels to 0.8.0 and had no problem importing statspace. Does anyone have the same problem?
Thanks.
import statsmodels.api as sm
sm.tsa.statespace.SARIMAX(..)
import pymongo
import gridfs
conn=pymongo.Connection()
db=conn.gridfs_testing
fs=gridfs.GridFS(db)
fs.list()
fs.put(open('/home/sairam_siripuram/Desktop/nba_data/01 - Intro.mp4','r'),filename='01 - Intro')
In the above code im trying to store mp4 file into mongodb using gridfs but it is throwing me the below error
Import Error:
Error:
fs=gridfs.GridFS(db)
AttributeError: 'module' object has no attribute 'GridFS'
[Finished in 0.1s with exit code 1]