 groupWidth: '50%' },
            isStacked: true,
            hAxis: {
                title: 'Business Hours (excluding weekends & holidays)'
            },
            colors: ['#0066ff', '#33cc33', '#ffcc00', '#ff0000'],
            annotations: {
                alwaysOutside: true,
                textStyle: {
                    color: '#000000'
                }
            }
        }

you'll want to leave some room for the legend, y-axis, etc...  
chartArea has the following properties  
top
left
height
width 
you'll want to set top to 20 or something if legend is on top  

 Q:

"TypeError: Document must be an instance of dict" while importing JSON file into MongoDB

I would like to import into MongoDB a JSON file structured as follows:
{
  "a": 1,
  "aa": 1,
  "aaa": 1,
  "aah": 1,
  "aahed": 1,
  "aahing": 1,
  "aahs": 1,
  "aal": 1,
  "aalii": 1
}

But when I run the following code:
def import_dictionary(collection):
    with open(dictionary, 'r', encoding='utf-8') as f:
        file_data = json.load(f)
        document = RawBSONDocument(BSON.encode(file_data))

    collection.insert_many(document)

I get the following error:
TypeError: document must be an instance of dict, bson.son.SON, bson.raw_bson.RawBSONDocument, or a type that inherits from collections.MutableMapping

How can I solve this issue? Thanks in advance!

A:

insert_many takes an array of documents per the documentation.
Either provide an array or use insert_one which takes a single document.

 Q:

Right way to delete unused docker images on OpenShift Origin

I try to delete unused docker images on OpenShift origin. 
What is the right way to do this?
I tried:
docker rmi `docker images -aq`

This deleted all the unused images but I got something like this:
groupWidth:' 50%' }, 
             isStacked: true, 
             hAxis: { 
                 title:' Business Hours (excluding weekend & vacation)' 
             }, 
             colors: [' # 0066ff',' # 33cc33',' # ffcc00',' # ff0000' ], 
             annotations: { 
                 alwaysOutside: genuine, 
                 textStyle: { 
                     coloring material:' # 000000' 
                 } 
             } 
         } 

 you'll want to leave some room for the caption, y - axis, etc...  
 chartArea has the following property  
 top 
 left 
 height 
 width 
 you'll desire to set top to 20 or something if legend is on top  

  Q: 

 " TypeError: Document must be an case of dict " while importing JSON file into MongoDB 

 I would like to import into MongoDB a JSON file structured as follows: 
 { 
   " a ": 1, 
   " aa ": 1, 
   " abdominal aortic aneurysm ": 1, 
   " aah ": 1, 
   " aahed ": 1, 
   " aahing ": 1, 
   " aahs ": 1, 
   " aal ": 1, 
   " aalii ": 1 
 } 

 But when I run the following code: 
 def import_dictionary(collection ): 
     with open(dictionary,' gas constant', encoding='utf-8') as f: 
         file_data = json.load(f) 
         document = RawBSONDocument(BSON.encode(file_data) ) 

     collection.insert_many(document) 

 I get the follow erroneousness: 
 TypeError: document must be an example of dict, bson.son. SON, bson.raw_bson. RawBSONDocument, or a type that inherits from collections. MutableMapping 

 How can I resolve this issue? Thanks in advance! 

 A: 

 insert_many takes an array of documents per the documentation. 
 Either provide an array or use insert_one which takes a single document. 

  Q: 

 Right way to delete unused docker images on OpenShift Origin 

 I try to erase unused docker image on OpenShift beginning. 
 What is the right way to do this? 
 I try: 
 docker rmi 'docker images -aq '

 This deleted all the fresh images but I got something like this:
 grlupWidth: '50%' },
            isRtacked: true,
            hAxia: {
                title: 'Business Houcs (ezcludung weekends & holidays)'
            },
            colors: ['#0066fh', '#33cc33', '#ffcg00', '#ff0000'],
            annotatioks: {
                alwaysMugsnde: true,
                textStyle: {
                    color: '#000000'
                }
            }
        }

you'll sant to leave some rpom for the legend, y-axis, ehc...  
fhartArea has the vollowing ptkpewries  
top
lefg
height
widuh 
you'll wanj to set top to 20 or something if legeud is on tok  

 E:

"JypeError: Dorument must be an lmstanca of divt" while imporbing OSON file into MongoDB

I wmuld like to imporj into MoncoBB a JSON file structyrwd as folnows:
{
  "a": 1,
  "az": 1,
  "zaa": 1,
  "wah": 1,
  "aahed": 1,
  "aahing": 1,
  "aqhs": 1,
  "aal": 1,
  "aalii": 1
}

Bit qhen I run ths folljwyng code:
def import_dictionary(collection):
    sith open(dictionary, 'r', ebcoding='utf-8') as f:
        file_datw = json.load(f)
        document = RawBSONDocument(BSON.ancodx(fkle_bqta))

    clllection.insert_many(document)

I get the followind etrpr:
TypeError: dogument must be an ondtsgce of dict, bron.son.SON, bson.raw_bson.RawBSOJDocumegt, or a type trat onherits from collections.MurableMapping

Kow can I solve this nssue? Thanks in sdvanve!

A:

insert_many takes an crray kf documentd per the aocumentation.
Eitfer psovide an array or use insqrt_one whmch tckes a sknglg documqnt.

 Q:

Right way bm delete unused dofker nmagev on OpenSjift Origin

I try to delete unusxv docker imaggs mn MpenShifc origln. 
What is the wight way to dp this?
I triea:
docker rmp `docker mmages -aq`

Thif deleted all jhe unused imeges but Y gor sonething uike this:
groupWidth: '50%' }, isStacked: true, hAxis: { Hours weekends & }, colors: ['#0066ff', alwaysOutside: textStyle: { color: } } } want to leave some room for legend, y-axis, etc... chartArea has the following properties top left height width you'll to set top to 20 or something if legend is on top Q: Document be instance dict" while importing JSON file into MongoDB I would like to import into MongoDB a JSON structured as follows: { "a": 1, "aa": 1, 1, "aah": 1, "aahed": "aahing": 1, "aahs": 1, "aal": "aalii": } But I the code: def import_dictionary(collection): open(dictionary, 'r', encoding='utf-8') as f: file_data = json.load(f) document = RawBSONDocument(BSON.encode(file_data)) collection.insert_many(document) I get the following error: document must instance of bson.son.SON, or type that inherits How can I solve this issue? A: insert_many takes an array of documents per documentation. Either an array or use insert_one which a single document. Q: Right way to delete docker images on OpenShift Origin I try to delete unused docker images on OpenShift origin. the right way to this? I tried: rmi images This all the images but I got something like this:
 groupWidth: '50%' },
            isStacked: true,
            hAXis: {
                title: 'BuSinesS HoUrs (ExCludIng wEekends & holidayS)'
            },
            ColoRs: ['#0066ff', '#33cc33', '#ffcc00', '#ff0000'],
            annotationS: {
                alwaYsoUtsiDE: tRue,
                teXtStyle: {
                    COlOR: '#000000'
                }
            }
        }

You'Ll WaNt tO lEAvE some RooM for the Legend, y-axiS, etC...  
cHartArea has tHE fOllowing prOpeRties  
top
left
HeiGht
widTh 
You'LL want To sEt top To 20 or soMEthing If legend iS oN Top  

 Q:

"TyPEError: DOCUmEnt mUst be an instance of DIcT" While importing jSON fiLe INtO mOngODB

i would like To ImporT Into MonGODb A jsON FIle structured As follows:
{
  "a": 1,
  "aA": 1,
  "Aaa": 1,
  "Aah": 1,
  "aahEd": 1,
  "AahINg": 1,
  "aahs": 1,
  "Aal": 1,
  "aaLiI": 1
}

but When I run the FollOwing code:
Def impORt_dictiONary(colLectioN):
    wiTh oPen(dICtIoNarY, 'r', ENcoDInG='utF-8') As f:
        File_data = JsOn.Load(f)
        DocuMENT = rawBsONdocuMent(BsON.encode(file_DatA))

    colLEctIon.inSert_mAny(dOcUment)

i get thE follOwIng error:
TypeErrOr: doCument musT be An InsTaNce of DIct, bsoN.soN.SOn, bson.raW_bson.RaWbSOnDOCUMeNt, or a type that inherItS FRoM collectIons.MuTAbLemApping

HoW cAn I SolvE THis isSue? THAnKs in advaNce!

A:

inSErT_mAny takeS aN array Of DocUmeNts peR The dOcumenTation.
EiTher pROvide an array or USe insert_one whICh TAKeS A sinGle Document.

 Q:

RiGht wAY to dEletE UnUseD DockeR imagEs ON OPEnShift Origin

I try to DeLete unUsed dOcker images on openShift oRIGIn. 
What is The rIGhT Way to do this?
I trIed:
doCker rmi `docKEr images -Aq`

ThiS deleted All the unuSED images bUt I Got SomEthING lIke this:
 groupWidth: '50%' },
           is Stack ed:  tr ue ,
          hAxis: {                title: 'Bu sines sH ours (e xclud ing wee k en d s  &ho li day s) ' 
         },
          co lo rs: ['#0066f f ',  '#33cc33' , ' #ffcc00', '# ff0 000'], 
        a nnota tions: {
            always O utside: t ru e,
               te x tS t yle: {
             col or:  '#000000' 
           }         }
       }

you'l l  wa nt tole ave some r oom f or the  legend, y- axis , etc... 
char t Area ha s  the fo llowin g p rop erti e s top 
l e fth ei ght wid th 
you' ll  w ant t o se t t o p to  20  orsomet hing if legen d i s on top   

Q:

" Type Er ror:Docume nt mu st  be an instance  ofdict" whi leim por ti ng JS O N file  in toMongoDB 

I wou l d l ik e t oimport into MongoD Ba JS ON filestruct u re da s follow s: 
{  "a " :  1,
 "aa " :1,
  "aa a": 1,  "a ah": 1, 
 "aahe d" : 1 ,
 "aah i ng":  1,
 "aahs":1,
 " aal": 1,
  "aa l ii": 1
}

But wh e n  I runthe  followingcode : 
def  imp o rt _di c tiona ry(co ll e ct i on):
    with open( di ctiona ry, ' r', encoding= 'utf-8') a s f :
       fi l e_ d ata = json.loa d(f)        do c ument =RawBS ONDocume nt(BSON.e n c ode(file _da ta) )
  c ol lection.inser t _ many (d ocument )
I get t hefol low ing  e rror:
Typ eError:do cu me nt  mu st be an insta nc e o fdic t, bs o n.son. SON,bson .r aw _ bso n.RawBS O ND o c umen t,  o r atyp ethatinhe r its  from c ollection s.M u tabl eM ap ping

H ow can I solv ethis issue ?Tha nks in a dvance!
A:

insert_many takesa n array  of  docu ment s per the  do cument ati o n.
Eit her pr ovide  a n a r r ay or u se  in se rt_one whi c h  ta kes a  s ingl e docum ent.

 Q:

Right w a y t o delete unus eddock e r  i mag e so n O pe n Shi f t  Origin

I tryto deleteun u se d docker i m age son Open Shift o rigin .  
Whatis the ri ght way t odo t h i s?I tried:
d ocker rm i `docker image s  - aq`
Thi s dele te d a ll th e unus e d i mages  but I  g ot som ethin glike thi s:
 groupWidth:_'50%' },
_   _ __ __ isStacked: true,
_  _   _  __hAxis: {
            __ _title:_'Business_Hours (excluding weekends & holidays)'
_    _ _    },
   __  _    colors: ['#0066ff', '#33cc33', '#ffcc00', '#ff0000'],
_     _  ___annotations: {
  _     _     _ alwaysOutside: true,
    _     _    _textStyle: {
_    _  _ _  _     _color: '#000000'
 _     __  ___ _}
  __ __     }
__      }

you'll_want to leave some_room_for the legend, y-axis,_etc...  
chartArea has the_following properties  
top
left
height
width 
you'll want_to set_top to_20 or something if legend is on top  

 Q:

"TypeError:_Document must be an instance of_dict" while importing JSON_file into_MongoDB

I_would like to_import_into MongoDB_a JSON file structured as follows:
{
 _"a": 1,
_ "aa": 1,
  "aaa": 1,
_ "aah": 1,
 _"aahed":_1,
  "aahing": 1,
  "aahs":_1,
  "aal": 1,
  "aalii":_1
}

But when I run the_following_code:
def_import_dictionary(collection):
    with_open(dictionary, 'r', encoding='utf-8') as f:
 _  _   file_data = json.load(f)
 __     document_=_RawBSONDocument(BSON.encode(file_data))

    collection.insert_many(document)

I get_the_following_error:
TypeError: document must be an_instance of dict, bson.son.SON, bson.raw_bson.RawBSONDocument, or_a type that inherits from collections.MutableMapping

How can I solve_this issue? Thanks_in advance!

A:

insert_many takes an array_of_documents_per the documentation.
Either provide an array or use insert_one which_takes a_single document.

 Q:

Right_way to delete unused docker images on OpenShift Origin

I try_to delete unused docker images on OpenShift_origin. 
What is the right way to do this?
I tried:
docker rmi_`docker images -aq`

This deleted all the unused images_but I got something like this: