Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
html module in python 3.6.8
#10
(May-11-2023, 03:49 PM)snippsat Wrote:
Pymongo Wrote:The count() method was deprecated in pymongo version 3.7 and removed in version 4.0. Instead,
you can use the count_documents() method to achieve the same functionality.

So can try this:
def saveFile():
    conn = MongoClient("xx.xx.xx.xx:27017")
    TravelHotelsPricelineDb = conn.travelHotelsPriceline
    rawLocationsHotelsPricelineDatacount = TravelHotelsPricelineDb.rawLocationsData.count_documents({})
    finishedLocationHotelsPricelineValidDatacount = TravelHotelsPricelineDb.finishedLocationsData.count_documents({"metaData.status": "VALID"})

    with open("/home/tomcat/scripts/HotelOutput_new_pricingDataLine_data.txt", "a") as text_file:
        text_file.write('{0} {1} {2}\n'.format(d1, rawLocationsHotelsPricelineDatacount, finishedLocationHotelsPricelineValidDatacount))
saveFile()
Ahh those long👀 names.

Thanks Snippsat.All the issues resolved . Much appreciated.
snippsat likes this post
Reply


Messages In This Thread
html module in python 3.6.8 - by suifra - May-09-2023, 07:24 AM
RE: html module in python 3.6.8 - by buran - May-09-2023, 09:01 AM
RE: html module in python 3.6.8 - by Larz60+ - May-09-2023, 09:02 AM
RE: html module in python 3.6.8 - by buran - May-09-2023, 09:07 AM
RE: html module in python 3.6.8 - by suifra - May-09-2023, 12:07 PM
RE: html module in python 3.6.8 - by Larz60+ - May-09-2023, 02:50 PM
RE: html module in python 3.6.8 - by snippsat - May-09-2023, 03:41 PM
RE: html module in python 3.6.8 - by suifra - May-10-2023, 10:09 AM
RE: html module in python 3.6.8 - by snippsat - May-11-2023, 03:49 PM
RE: html module in python 3.6.8 - by suifra - May-12-2023, 11:30 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Tkinterweb (Browser Module) Appending/Adding Additional HTML to a HTML Table Row AaronCatolico1 0 964 Dec-25-2022, 06:28 PM
Last Post: AaronCatolico1
  reading html and edit chekcbox to html jacklee26 5 3,127 Jul-01-2021, 10:31 AM
Last Post: snippsat
  HTML to Python to Windows .bat and back to HTML perfectservice33 0 1,973 Aug-22-2019, 06:31 AM
Last Post: perfectservice33

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020