Create a Data Entry Form for MS Word in 10 Minutes using Python | PySimpleGUI & docxtpl Tutorial

Поделиться
HTML-код
  • Опубликовано: 28 ноя 2024

Комментарии • 256

  • @CodingIsFun
    @CodingIsFun  2 года назад +8

    *I will be here in the comments section. If you have any questions, please let me know.*

    • @achyarfauzan4880
      @achyarfauzan4880 2 года назад

      how to make checkbox title to be a value in that

    • @CodingIsFun
      @CodingIsFun  2 года назад

      @@achyarfauzan4880 Thanks for your question, but I am not sure I understand you correctly. Can you perhaps elaborate on what it is you're actually trying to achieve?
      Please provide some additional info. Thanks!

    • @jockfaire
      @jockfaire 2 года назад +1

      Hey. keep up the great work. I've just subscribed to your channel. Can you do a tutorial on how to generate a .pdf file in python if you don't already have such a tutorial?

    • @SaulEduardoo2
      @SaulEduardoo2 2 года назад +1

      You provide such a great support!! :D 👌👍... Much appreciated!

    • @ariefsurya2191
      @ariefsurya2191 Год назад +1

      Can i run the gui app when i open My Microsoft word app ?
      So if i fill data and press "submit" in gui, i can see my data in Microsoft word change. without i close and reopen my Microsoft word

  • @fsilveyra6469
    @fsilveyra6469 Год назад +14

    This is one of the best programming tutorials I have ever seen

    • @CodingIsFun
      @CodingIsFun  Год назад

      Thanks for the kind words! I am glad you enjoyed it.

  • @ahassan7270
    @ahassan7270 Год назад +2

    You are a genius. What a wonderful tutorial. Easy to understand, well explained, and to the point. I hope to post full projects using Python Tkinter and PySimpleGUI.
    You really deserve TEN STARS

    • @CodingIsFun
      @CodingIsFun  Год назад

      Thanks for the kind words! I am glad you enjoyed it. ❤️👍

  • @alterboy1
    @alterboy1 6 месяцев назад

    Most useful programming tutorial I have ever seen!

    • @CodingIsFun
      @CodingIsFun  6 месяцев назад

      Wow, thanks! Cheers, Sven ✌️

  • @nasirmahmudapar8549
    @nasirmahmudapar8549 2 года назад +1

    The way of your explining is great. People can learn a lot in a very short time. And all of your topics are very useful. Thank You.

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Thank you for your kind feedback!

  • @deejaysoulution
    @deejaysoulution 2 года назад +3

    Wow! So amazing and easy explained! Exactly what I was looking for. Thank you

    • @CodingIsFun
      @CodingIsFun  2 года назад +1

      Glad you liked the video. Thanks for watching! :)

  • @pedrodantas7696
    @pedrodantas7696 10 месяцев назад

    Simple and to the point.
    Thank you very much and keep with your fantastic work!

    • @CodingIsFun
      @CodingIsFun  10 месяцев назад

      I'm thrilled you enjoyed it! Thanks for commenting and watching. Cheers, Sven ✌️

  • @johnwindsor5426
    @johnwindsor5426 2 года назад

    If I do not run exe python, every thing is perfect. Great video!

  • @mubafaw
    @mubafaw 11 месяцев назад

    Very practical and useful. You make coding fun! 😊👍

    • @CodingIsFun
      @CodingIsFun  11 месяцев назад

      Glad to hear you liked it! Thank you for commenting and watching.

  • @E6hosting
    @E6hosting 2 года назад +2

    Thank you for this video, you have turned an hour long chore into a 5 minute giggle fest. I could not get the gui working, but the app in vs code is enough for me.

    • @CodingIsFun
      @CodingIsFun  2 года назад +1

      Thanks for watching the video & taking the time to leave a comment! Well, at least the word template generator (w/o GUI) is working :)

  • @Baiev
    @Baiev Год назад

    That's very good tutorial, direct to the point...👏🏻👏🏻👏🏻

    • @CodingIsFun
      @CodingIsFun  Год назад

      Glad you liked it. Thanks for watching and taking the time to leave a comment! 👍

  • @dillibabu7280
    @dillibabu7280 2 года назад

    I was badly looking for a method to create the contract document. Thank you very much for this easy tutorial.

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Fantastic! Hope you can you this tutorial as a starting point to create your desired application :)

  • @МитяА-р5к
    @МитяА-р5к 5 месяцев назад

    Самый лучший урок!!!

    • @CodingIsFun
      @CodingIsFun  5 месяцев назад

      Glad to hear you liked it! Thank you for commenting and watching. Cheers, Sven ✌️

  • @shinrafahell
    @shinrafahell 2 года назад +1

    Great tutorial sir keep it up with this incredible work!

  • @aavalos163
    @aavalos163 11 месяцев назад

    Thank you for sharing. It was very helpful for my CRM project.

    • @CodingIsFun
      @CodingIsFun  11 месяцев назад

      Glad it was helpful! Thanks for watching and taking the time to leave a comment 👍

  • @johnwindsor5426
    @johnwindsor5426 2 года назад

    It is a great tutoril. it is short but very useful. Thank you so much!

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Thanks for the kind words! I am glad you enjoyed it.

  • @ricardobojorquez5793
    @ricardobojorquez5793 Год назад

    Life changing.. amazing!

    • @CodingIsFun
      @CodingIsFun  Год назад

      Glad to hear you liked it, Ricardo! Thank you for commenting and watching. 👍

  • @kapibara2440
    @kapibara2440 Год назад

    Fantastic stuff !!! ❤

    • @CodingIsFun
      @CodingIsFun  Год назад

      Glad to hear you liked it! Thank you for commenting and watching. 👍

  • @erosserver8142
    @erosserver8142 Год назад +1

    Very good tutorial, but I have a question if we use a {Client} or [Name] or , how can we do this, as financial contracts are much more complex Example:
    {TermTitle}
    {Senior} {Currency} {AggPrinAmount} {Collared}{Type} Notes due {MaturityDate format “yyyy”}

    • @CodingIsFun
      @CodingIsFun  Год назад +1

      Thanks so much for watching the video and leaving a comment! Your request is definitely noted. However, I get a ton of requests for custom solutions and, as much as I'd love to help everyone out, I just don't have the time in my schedule to develop and test all of them. I hope you can understand. Happy Coding!

  • @GregoryCarnegie
    @GregoryCarnegie 2 года назад +1

    This is cool. I wonder if booleans are possible, like using certain values if a checkbox is ticked. Or choosing from drop-down lists.

    • @CodingIsFun
      @CodingIsFun  2 года назад +2

      Thanks for watching.
      Sure, that is possible with PySimpleGUI.
      Regarding the dropdown list, have a look at the documentation under list-box:
      pysimplegui.readthedocs.io/en/latest/call%20reference/#listbox-element
      In my other tutorial (entry form for Excel), you can see how to implement those elements incl. the checkbox (returns TRUE/FALSE):
      ruclips.net/video/svcv8uub0D0/видео.html
      I hope this helps!
      Happy Coding!

  • @kroepkroep
    @kroepkroep 10 месяцев назад

    This is great man. Thank you

    • @CodingIsFun
      @CodingIsFun  10 месяцев назад

      Glad you liked it. Thanks for tuning in!

  • @alyezo
    @alyezo Год назад +1

    This was super helpful Sven! Thanks so much!
    But I've got a question, Can you please help?
    Is it possible to duplicate the template with DIFFERENT VARIABLES, and add it as another Page?
    I'd really appreciate your help on this Sven :)!
    Thanks!

    • @CodingIsFun
      @CodingIsFun  Год назад

      Thank you very much for watching the video and your comment. Your requirements are well noted. Yet, I receive many requests for creating individual solutions. As much as I want to help, I simply do not find the time in my daily schedule to develop & test all the different requests. I hope you can understand. Thank you!

  • @ermalgashimramori
    @ermalgashimramori 2 года назад +2

    As always invaluable. I was thinking of adding Pandas also, so for a company with say 100 employees can have this template and read the data from an excel file, and generate all the empoloyees contracts in matter of seconds.

    • @CodingIsFun
      @CodingIsFun  2 года назад +2

      Thank you! That is a fantastic idea. 👍
      I went ahead and created the following solution for you:
      Code: github.com/Sven-Bo/word-generator-based-on-excel-list
      Demo: raw.githubusercontent.com/Sven-Bo/word-generator-based-on-excel-list/master/demo.jpg
      I hope you like the solution :)

    • @ermalgashimramori
      @ermalgashimramori 2 года назад +1

      @@CodingIsFun Omg, your rock man.

  • @alecouto
    @alecouto 2 года назад

    Awesome project!! Helped a lot

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Happy to hear that, Alexandre! Thanks for watching & leaving a comment! :)

  • @bc4198
    @bc4198 2 года назад +1

    I like your little clay buddy 👍

  • @geoffreyzziwambazza7862
    @geoffreyzziwambazza7862 2 года назад

    I really like how you implemented a process to distribute this program with non technical people to use with the psg compiler

    • @CodingIsFun
      @CodingIsFun  2 года назад +1

      Happy to hear that it was useful; thank you for taking the time to leave a comment and for watching the video!

  • @travelaxtours
    @travelaxtours 2 года назад

    Hello! Great tutorial!
    May I ask if its possible to do reverse in this? Taking the data from the saved doc file to the program we made?
    Like using [Open] button to get data from a document previously produced with this? Thank you!
    Maybe like adding a field code/reference on word so we have strings to capture? Thanks!

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Thank you very much for watching the video and your comment. Your requirements are well noted. Yet, I receive many requests for creating individual solutions. As much as I want to help, I simply do not find the time in my daily schedule to develop & test all the different requests. I hope you can understand. Thank you!

  • @soufianeelabboubi897
    @soufianeelabboubi897 2 года назад

    Thank you for subtitles Arabic and thank you for informations 😍😍

    • @CodingIsFun
      @CodingIsFun  2 года назад +1

      You're very welcome! Thank you for watching and for the comment!

  • @ipelezikis
    @ipelezikis 2 года назад

    Love your videos!! What tools do you use to make these wonderful videos with all the animations?

    • @CodingIsFun
      @CodingIsFun  2 года назад

      *I am glad to hear you are enjoying them, thanks for watching and for the comment!* I am using Camtasia to edit my videos.

  • @ladedruck
    @ladedruck Год назад +1

    Very good but the Main Part is missing 😅 how you can change + Save different docx files (version1.docx, version2.docx,..) with the same named fields inside of the docx files?

    • @CodingIsFun
      @CodingIsFun  Год назад +1

      Thank you very much for watching the video and your comment. Your requirements are well noted. Yet, I receive many requests for creating individual solutions. As much as I want to help, I simply do not find the time in my daily schedule to develop & test all the different requests. I hope you can understand. Thank you!

  • @MisterIf
    @MisterIf 2 года назад

    Good work! Thanks!

  • @Commando244
    @Commando244 Год назад

    Is there a way to use checkboxes to delete certain parts of a word document? I know you can’t make a new video for this, but any general guidance if possible would be great

    • @CodingIsFun
      @CodingIsFun  Год назад

      Thank you very much for watching the video and your comment. Your requirements are well noted. Yet, I receive many requests for creating individual solutions. As much as I want to help, I simply do not find the time in my daily schedule to develop & test all the different requests. I hope you can understand. Thank you!

  • @diegomartin5250
    @diegomartin5250 2 года назад

    Excelente!!! 👍👍👍👍👍👍👍👍

  • @domindomin1955
    @domindomin1955 2 года назад

    Is it possible to make something like a document preview window? if yes, how? thanks for answers

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Thanks for watching.
      That sounds possible, yet I do not have a code example.
      You could try to load the content of your word document (e.g. using textract textract.readthedocs.io/en/stable/ ) and then display the content in a PySimpleGUI element. I hope it helps! Happy Coding!

  • @GFPCCotabatoOperationsManager
    @GFPCCotabatoOperationsManager Год назад

    hi, great vid. may i know if i could make it as the generated documents are saved to a different folder?

    • @CodingIsFun
      @CodingIsFun  Год назад +1

      Thanks for watching. I have created the following version for you: gist.github.com/Sven-Bo/bfaff775394579d4915aab9c43700633
      Please adjust the output folder(path) [Line 30] to your needs. I hope you like the solution.
      Happy Coding!

    • @GFPCCotabatoOperationsManager
      @GFPCCotabatoOperationsManager Год назад

      @@CodingIsFun thank you so much. you're a lifesaver

  • @renziekun5892
    @renziekun5892 Год назад

    Hey Sven, I tried doing this using IDLE python, does using different python IDLE matters? because it is not working for me. Perhaps I can ask what kind of python you are using?

    • @CodingIsFun
      @CodingIsFun  Год назад

      Hi Renzie! The IDE or text editor shouldn't matter. In the video, I used Atom, but you can use any other text editor or IDE. Good luck debugging your code! 🍀

  • @domindomin1955
    @domindomin1955 2 года назад +1

    another question. after execute i have this error: No such file or directory: 'C:\\Users\\User\\AppData\\Local\\Temp\\_MEI37762\\document.docx' , why? and what can i do?

    • @CodingIsFun
      @CodingIsFun  2 года назад +1

      Instead of:
      document_path = Path(__file__).parent / "document.docx'"
      Try:
      document_path = Path.cwd() / "document.docx'"

    • @domindomin1955
      @domindomin1955 2 года назад +2

      @@CodingIsFun i love u dude

  • @hyunkim85
    @hyunkim85 Год назад

    I love it! if possible, help to advise why file has been save to AppData\Local\Temp like that? I'm using .exe file after compile.

    • @CodingIsFun
      @CodingIsFun  Год назад +1

      Thanks!
      Try to change the following:
      current_dir = Path(__file__).parent if '__file__' in locals() else Path.cwd()
      to this:
      current_dir = Path.cwd()

    • @manlikecapitan
      @manlikecapitan Год назад

      @@CodingIsFun How do you do this?

    • @CodingIsFun
      @CodingIsFun  Год назад

      @@manlikecapitan What do you mean?

    • @manlikecapitan
      @manlikecapitan Год назад

      @@CodingIsFun No worries, figured it out thanks to your replies in the comments. Thank you so much, I respect the fact that you actually reply and try to help people out. Appreciate it.

  • @matthewhornmusic
    @matthewhornmusic Год назад

    Hi Sven, I've run into a problem in converting my py to exe using Mike's psgcompiler. My bitdefender goes nuts and detects Trojan temporary files during the process and blocks them, causing the conversion to fail. Is this normal behaviour for bitdefender? Please can you advise on this? Many thanks, Matthew

    • @CodingIsFun
      @CodingIsFun  Год назад

      Hi Matthew,
      Thank you for watching. Under the hood, the psgcompiler uses the PyInstaller package. I have experienced something similar when trying to distribute the packaged .exe online. It then gets flagged by browsers and also local antivirus software on the end users' devices. Unfortunately, I do not have a solution to this. If you just want to use it on your personal device, one quick workaround would be to deactivate the Bitdefender software for the time being while compiling the Python project to an executable. And perhaps, once done, add an exception to Bitdefender so that it is not going to be flagged. I know this might not be the answer you are looking for, but unfortunately, I do not know another workaround.

  • @Mrcgplay
    @Mrcgplay 2 года назад

    AMAZINGGGGG

  • @moreloveandjoy
    @moreloveandjoy Год назад

    Amazing.

    • @CodingIsFun
      @CodingIsFun  Год назад

      Glad you liked it. Thanks for watching.

  • @bc4198
    @bc4198 2 года назад

    That's so cool!

  • @SanataniAryavrat
    @SanataniAryavrat 2 года назад

    Thanks so much, you are an awesome teacher... loved this tutorial a lot

    • @CodingIsFun
      @CodingIsFun  2 года назад +1

      Thanks for the kind words! I am glad you enjoyed it.

    • @SanataniAryavrat
      @SanataniAryavrat 2 года назад +1

      @@CodingIsFun Looking forward to more videos... may be longer tutorials series... hahaha ... all the best 👍

  • @contra_plano
    @contra_plano 2 года назад

    It works with libreoffice writer?
    I like pysimplegui also

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Thanks for watching. I have not tried it with LibreOffice yet.

  • @murikosproduction6286
    @murikosproduction6286 2 года назад +1

    Hi there Sven,I've been trying to follow along with your tutorial and create my own document. So far I managed to do all right, but now I am on a stage of turning .py to .exe file and it did turn out well, but it doesn't generate a document stating that there is no such .docx file in _MEIxxxxx directory. (I tried to look up for directory and put the file in it but it turns out it just a temporary directory, which disappears once you exit .exe file)
    I even took your example and tried to use it as .exe file and it returns the same error.

    • @CodingIsFun
      @CodingIsFun  2 года назад +1

      Please change the following:
      Delete: document_path = Path(__file__).parent / "vendor-contract.docx"
      Add: document_path = Path.cwd() / "vendor-contract.docx"
      ..and try again. Happy Coding!

    • @murikosproduction6286
      @murikosproduction6286 2 года назад

      @@CodingIsFun My man, thank you so much! It did help: I changed both in document_path and output_path and it returned as expected. Thank you once again!

  • @vfvlaboratory9904
    @vfvlaboratory9904 2 года назад

    Is it possible to create a button on GUI where i can select different templates, because i have the same template but in two languages. So for this reason i want to create a button to Select the Language of the template ( i have created it as a differenc document ) and after that i want to fill the fields needed. Thank you.

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Thank you very much for watching the video and your comment. Your requirements are well noted. Yet, I receive many requests for creating individual solutions. As much as I want to help, I simply do not find the time in my daily schedule to develop & test all the different requests. I hope you can understand. Thank you!

  • @krishab5908
    @krishab5908 2 года назад

    I don't understand the file path you mentioned in the start. What are we supposed to write it path(__file__) part. Just that or the actual path?

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Sorry, but I do not understand your question. It is explained at 1:46 min
      It will just return the folder of the current Python file.
      Have also a look at the documentation: docs.python.org/3/library/pathlib.html
      Happy Coding!

    • @ME-pu1pp
      @ME-pu1pp 2 года назад

      @@CodingIsFun i think i have the same problem as the commentor. Mine shows that "NameError: name '__file__' is not defined". What should i do to resolve this?

  • @alexandruion7346
    @alexandruion7346 Год назад

    How do you make everything in your word document in these brackets {} highlighted by default?

    • @CodingIsFun
      @CodingIsFun  Год назад

      I just marked it manually yellow

  • @ricardo.alves.campos
    @ricardo.alves.campos 2 года назад +1

    Really nice, thank you for this video, as always perfectly explained !

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Thank you very much! As always, thanks for your support and comments! :)

  • @balachandarchinnappa
    @balachandarchinnappa Год назад

    hi, your video tutorial is really a handy one for any code developer. I have a doubt. We try to develop an entry form with nearly 30 details with character length around 50 each. When we try to run with your code model, layout did not fit in the window. alternatively we tried to run through 'sg.Column' with scrollable bar. Despite scrollable window appear with read and exit option, values entered could not be linked with word document and python window returns following error -
    "jinja2.exceptions.TemplateSyntaxError: expected token 'end of print statement', got 'OTHER'
    is it right to use this column option? following is the structure
    import...
    .
    .
    .
    column = [
    .
    sg.text [...]
    '
    '
    ]
    layout = [
    [sg.Column (column, scrollable = True, vertical_scroll_only = True,key ='COLUMN')],
    [sg.Button ("Generate"), sg.Exit("Exit")],
    ]
    Window = sg.Window("PAT", layout, element_justification="Center")
    while True:
    event, values = Window.read()
    if event == sg.WIN_CLOSED or event == "Exit":
    break
    if event == "Generate":
    doc.render(values)
    print(event, values)
    output_path = Path(__file__).parent / f"PAT_{values['PATNO']}_{values['YEAR']}.docx"
    doc.save(output_path)
    sg.popup ("File saved", f"File has been saved here:{output_path}")
    Window.close ( )
    Provide your insight into this doubt.. Thanks ..

    • @CodingIsFun
      @CodingIsFun  Год назад +1

      Thanks for watching and for your question. Hard to tell from a distance why you are facing an error. Sorry that I cannot help.

  • @nusantara8508
    @nusantara8508 2 года назад

    hi there, why the created docx is on tmp folder when I created .exe, not on the specified output_path .. Is it connected with __pycache__ ?? thanks a bunch

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Instead of:
      document_path = Path(__file__).parent / "document.docx'"
      Try:
      document_path = Path.cwd() / "document.docx'"

    • @nusantara8508
      @nusantara8508 2 года назад

      @@CodingIsFun it worked thank you ... as i checked you have made the lesson about pathlib too ... thank you again

    • @CodingIsFun
      @CodingIsFun  2 года назад

      @@nusantara8508 Happy to hear that it worked.

  • @omarsantoyo4295
    @omarsantoyo4295 2 года назад

    Hello, great video. I am using your tutorial to build the form in a MacOS. All working fine, however, when trying to generate the EXE using PSG Compiler (I want to generate the EXE and then share it with a Windows machine), I get "The output directory is not empty. Please remove all its contents or use the -y option (remove output directory without confirmation)", any idea why this error appears?

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Thanks for watching and for your question. Hard to tell from a distance why you are facing an error. Sorry that I cannot help.

    • @yannhouphouet8624
      @yannhouphouet8624 Год назад

      You need to remake the EXE on a windows machine

  • @ariefsurya2191
    @ariefsurya2191 Год назад

    Can i run the gui app when i open My Microsoft word app ?
    So if i fill data and press "submit" in gui, i can see my data in Microsoft word change. without i close and reopen my Microsoft word

    • @CodingIsFun
      @CodingIsFun  Год назад

      I have not tried it out yet, but feel free to give it a try :)

  • @georgejunior7556
    @georgejunior7556 Год назад

    very educative. everything runs smoothly just one concern. the .exe file is big. the .py is a few kbs but the .exe is more than 100mbs. any fix for that or it's all good?

    • @CodingIsFun
      @CodingIsFun  Год назад

      Thanks for watching! I'm glad you found it educational. As for the size of the .exe file, it's normal for executables to be larger in size compared to the source code. This is because the executable includes all the dependencies required to run the code, even if they are not used in the project. One way to reduce the size of the executable is to create a separate virtual environment and only include the packages needed for the project. This way, you can ensure that only the necessary files are included in the build process.

    • @georgejunior7556
      @georgejunior7556 Год назад

      @@CodingIsFun thank you for your response. how about a line of code to format the currency to append a comma after every thousand?

    • @CodingIsFun
      @CodingIsFun  Год назад +1

      @@georgejunior7556 Your request is definitely noted. However, I get a ton of requests for custom solutions and, as much as I'd love to help everyone out, I just don't have the time in my schedule to develop and test all of them. I hope you can understand. Happy Coding!

  • @rvnReVeN
    @rvnReVeN 2 года назад

    Thanks for the video. I watched several of your videos.
    How can I use docxtpl in flask. I'm breeaking my head for 5 days.
    I've searched a lot but I haven't been able to work.

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Thanks for watching the video. Unfortunately, I have not tried to use docxtpl in flask yet. Hence, I cannot provide much support here.

  • @andrell1206
    @andrell1206 2 года назад

    so in addition to this, would it be possible to set up a method of adding an email to this form and emailing it to the person who fills it out ? is this a video you could make ?

    • @CodingIsFun
      @CodingIsFun  2 года назад +1

      In general, PySimpleGUI is only responsible for the GUI. This means you could include any python action you would like in the GUI.
      E.g. for sending an email, have a look at the following tutorial: ruclips.net/video/JRCJ6RtE3xU/видео.html
      Once you understand how to send emails using Python, you can define a function and call it from the GUI.
      I hope this helps! Happy Coding! :)

  • @drvasquez6233
    @drvasquez6233 2 года назад +1

    very good video and well explained, but I wish it could be saved in pdf

    • @CodingIsFun
      @CodingIsFun  2 года назад +1

      Thank you! You could also save it as a pdf. I have done something very similar in the following video:
      ruclips.net/video/T3meVMaV8AA/видео.html
      I hope it helps! Happy Coding!

    • @drvasquez6233
      @drvasquez6233 2 года назад +1

      Thanks

  • @raphaelcruz101
    @raphaelcruz101 2 года назад

    Hey Sven, great tutorial, thank you so much! How can I make a value print in the Word template file (just like you showed in the non-GUI part) using the user data input?

    • @CodingIsFun
      @CodingIsFun  2 года назад +1

      Thanks for watching. Can you let me know the timestamp? I am not sure to which print command you are referring to. Thanks!

    • @RaphaCruz
      @RaphaCruz 2 года назад

      @@CodingIsFun I got it! Now my problem is I need to call a function to the "Read" button so I can choose the directory to save the Word file! Any ideas? Thanks!

  • @manlikecapitan
    @manlikecapitan Год назад

    Hi Sven,
    When I try to put my fields into tabs my create button stops working and I get an error saying keywords must be strings. Without the tabs it seems to work but since I have many fields I need to use them. The logic remains constant but I'm getting that error in the console

    • @CodingIsFun
      @CodingIsFun  Год назад +1

      Thanks for watching! It's hard to diagnose the issue without more context, but the error message you received typically indicates that a non-string value was used for a keyword argument. Please review the line of code where the error occurred and ensure that all keywords are specified as strings. Happy Debugging! :)

  • @peppetime
    @peppetime 10 месяцев назад

    HI! thanks for the video, you're very good and I'm learning a lot from you, I would still like to ask you how to change the destination folder for saving the Word file, I can't solve this problem, and I can't find much material on the net, I thank you and I'll take advantage of it to say hello to you and everyone!!

    • @CodingIsFun
      @CodingIsFun  10 месяцев назад +1

      Thanks for watching. It is explained in the video: 7:55 min

    • @peppetime
      @peppetime 10 месяцев назад

      @@CodingIsFun Grazie!!!

  • @ME-pu1pp
    @ME-pu1pp 2 года назад

    Sorry sir, I have a question. Let say I have 2 AMOUNT (AMOUNT A & AMOUNT B), what should I do to have it sum up automatically? (like the one you did for nonrefundable). Thanks in advance

    • @CodingIsFun
      @CodingIsFun  2 года назад +1

      Thanks for watching. I would be great if you could provide an actual code snippet and explain what you have tried so far.

  • @mustafachenine7942
    @mustafachenine7942 Год назад

    thank you

    • @CodingIsFun
      @CodingIsFun  Год назад

      My pleasure! Appreciate you taking the time to watch and leave a comment.

  • @burnoutcycle
    @burnoutcycle 2 года назад

    Great !!!!

  • @Pgertse7
    @Pgertse7 Год назад

    Im followed along with your tutorial, but when i generate the output doc the name does not appear on the doc it leaves it blank.

    • @CodingIsFun
      @CodingIsFun  Год назад

      Thanks for watching. Please clone the GitHub repo and try again. Thanks!

  • @leonardolozzi
    @leonardolozzi 7 месяцев назад

    Is possibile insert images with the same process?

    • @CodingIsFun
      @CodingIsFun  7 месяцев назад

      Yes, that is possible. Have a look here: ruclips.net/video/T3meVMaV8AA/видео.htmlsi=_vPhVryYXpHdvHDk
      Happy Coding! Cheers, Sven ✌️

  • @rajeshrao7
    @rajeshrao7 2 года назад

    Hi, I loved your video and thank you for guiding us in the right direction.
    I'm stuck where I get an error, Undefined File "", line 22, in top-level template code
    jinja2.exceptions.UndefinedError: 'S' is undefined
    How do I fix this? I do not have anything like that in my code and I followed exactly yours.
    Any inputs would be highly appreciated!

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Thanks for watching and for your question. Hard to tell from a distance why you are facing an error. Sorry that I cannot help.

  • @asjadhamizan252
    @asjadhamizan252 8 месяцев назад

    is it possible to add image to the doc? any tips? hehe i want to help my mom with her multiple lesson plan that need to submit every week omg, hope i can help her withthis apps

    • @CodingIsFun
      @CodingIsFun  8 месяцев назад

      Thank you very much for watching the video and your comment. Your requirements are well noted. Yet, I receive many requests for creating individual solutions. As much as I want to help, I simply do not find the time in my daily schedule to develop & test all the different requests. I hope you can understand. Thank you!

  • @johnwindsor5426
    @johnwindsor5426 2 года назад

    Dear Sir, all is nice. But when I try to run exe file, the error show: Failed to execute script due to unhandled exception. No such file or directory.
    I checked path, it try to load ..\\AppData\\Local\\Temp\\... Not load my current working directory. All docxtpl required files could not be loaded.
    How to fix this. I install python using venvture enviroment. Do you have a good idea?
    Thank you so much

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Please change the following:
      Replace this:
      document_path = Path(__file__).parent / "vendor-contract.docx"
      With this:
      document_path = Path.cwd() / "vendor-contract.docx"
      ..and try again! Thanks!

  • @ahmadmureed4739
    @ahmadmureed4739 2 года назад

    Hi, thanks for wonderfull explaination. can you please werite me by which code can I add an image (.png) in this document ?

    • @ahmadmureed4739
      @ahmadmureed4739 2 года назад

      @@CodingIsFun thankyou so much for your reply. with do respect I wanna complete my question. how can I add a (.png) file in this created (.docx) file which created by this code?
      i need the command as to add a (.png) file in this (.docx) document. either Automatically or by using a checkbox button. it doesn't matter. i need to know by using which command I can add the .png file in this .docx which created by this code

    • @CodingIsFun
      @CodingIsFun  2 года назад

      @@ahmadmureed4739 Please check out the following video: ruclips.net/video/T3meVMaV8AA/видео.html
      In the video, I am going through the steps to insert images into the Word document.

    • @ahmadmureed4739
      @ahmadmureed4739 2 года назад

      @@CodingIsFun i have checked the video. but I cant build a command that insert a .png in this docx which created by this code. i also want to ask how can I add another entry widget in this window as to give the name of created file. please give me the command code if its possible.

    • @ahmadmureed4739
      @ahmadmureed4739 2 года назад

      @@CodingIsFun thanks for the wonderfull toturials. i am trying to work with this. i have a question about. i want to save the file each time in a different name. can you please write me by which command can I define name of the saved file? i am using pycharm to run this code.

  • @SaulEduardoo2
    @SaulEduardoo2 2 года назад

    Hi Sven, here is an idea for a new video... Python + Outlook + SimpleGUI to get values for Subject and Body

  • @taruku_luca
    @taruku_luca 2 года назад

    I learn a lot from you bro! Tried this code. Awesome.
    Regarding the docxtpl, how could I change the output path for newly created document file? What if I want to save it in another folder that is different where my python fille is located?
    What code should I use?
    Will really appreciate your input here bro

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Thanks for watching. Happy to hear that you learned a lot.
      Regarding your question, I recommend 'pathlib' for dealing/specifying the output file path. Have a look here: ruclips.net/video/iqZ2V8qTYq8/видео.html
      I hope it helps! Happy Coding!

    • @taruku_luca
      @taruku_luca 2 года назад

      @@CodingIsFun Another query bro. why is my psgcompiler not recognized as command in cmd?

    • @CodingIsFun
      @CodingIsFun  2 года назад

      @@taruku_luca Hard to tell from a distance. My closest guess is that you are getting this issue because you are trying to import a module of a library which is not installed in your virtual environment. If you have run 'pip install psgcompiler' already, ensure to call psgcompiler from the same environment in which you installed the package. For example, in your IDE/text editor, you might have set a different Python environment for executing your script. Therefore, try to run psgcompiler also from the command prompt. If that does not work, try searching for the text of your error message on Google/StackOverflow. Happy Debugging!

    • @taruku_luca
      @taruku_luca 2 года назад

      @@CodingIsFun Already solved this issue bro. thanks. I also watched your PathLIb lectures. Downloaded the cheatsheet. Very comprehensive bro. Thanks so much.
      One thing I haven't seen in the PathLib tutorial is what if I want to save file on the desktop? And if I convert it into .exe file, what path should I write so that the output path will be universal in desktop of any user?
      for example: This is my output path.
      C:\Users\username\Documents\pycharm\learning phyton\sample
      If I convert this into .exe , then pass it to my colleagues, can they save it on the same output path regardless of the username?

    • @taruku_luca
      @taruku_luca 2 года назад

      If not, what code should I use so that the output path will disregard the username?

  • @theb7054
    @theb7054 2 года назад

    Hi sir. Can we convert the user input text into uppercase? Even if the user type in lowercase, I want the input to appear as uppercase in the template.
    If it possible, can you share the code on how to do that? Thanks in advance

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Yes, it is possible. Example:
      values["CLIENT"] = str(values["CLIENT"] ).upper()

    • @theb7054
      @theb7054 2 года назад

      @@CodingIsFun yeayy it works. Thanks a lot sir😊

  • @mohussein4699
    @mohussein4699 2 года назад

    Nice video
    But how can I extract table from xlsx file to automated docx??

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Thanks for watching the video. Can you perhaps elaborate on what it is you're trying to achieve? Please provide some additional info. Thanks!

    • @mohussein4699
      @mohussein4699 2 года назад

      @@CodingIsFun I have some CSV files which I want to extract data from them and put it at one docx file .I need a script that make this automatically
      Thanks for your interest ☺️

    • @CodingIsFun
      @CodingIsFun  2 года назад

      @@mohussein4699 I have a similar tutorial on that topic. Find it here: ruclips.net/video/Zy9sx4GvjUY/видео.html
      It should give you a good starting point. Happy Coding!

  • @TheSloth51
    @TheSloth51 2 года назад

    Hi great video! Can I do this with a PDF file?

    • @CodingIsFun
      @CodingIsFun  2 года назад

      That should be possible. An easy way would be to simply to convert the created Word Document to PDF (as shown here: ruclips.net/video/T3meVMaV8AA/видео.html)
      Happy Coding!

  • @punjaramborhade1701
    @punjaramborhade1701 2 года назад

    Your video great, i found very late, really good...
    Thanks for sharing knowledge.
    One query, i m fetching live nse share market data of stock from morning 9.15 to 3.30 in excel.
    1. Can't open excel while recording.
    2. If I want to visualisation while recording data means = 9.15, 9.20,9.25 same data i want in visualize form (webpage/or else) till 3.30 while recording in excel.
    How to do it...
    Im digging but search brought me to u..
    Plz help...

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Sounds like an exciting project, but I cannot answer as I do not know your code (base), and I am not entirely sure what you are trying to achieve.

    • @punjaramborhade1701
      @punjaramborhade1701 2 года назад

      @@CodingIsFun thanks for reply...
      Give me your email ID or else, i will pass code, so u can understand.

  • @ranur2
    @ranur2 3 месяца назад

    How we can insert the picture or .txt file in word?

    • @CodingIsFun
      @CodingIsFun  3 месяца назад

      Thanks for watching. Please check out this video: ruclips.net/video/T3meVMaV8AA/видео.html
      Happy Coding! Cheers, Sven ✌️

  • @domindomin1955
    @domindomin1955 2 года назад

    Is there any option to print automatically those documents after Save?

    • @CodingIsFun
      @CodingIsFun  2 года назад +1

      Yes, should be possible. Have a look here: stackoverflow.com/a/8413374

    • @domindomin1955
      @domindomin1955 2 года назад +1

      @@CodingIsFun Thanks!!

  • @subinsuresh6481
    @subinsuresh6481 2 года назад

    Im getting an error like ..failed to execute script 'vendor-contract-gui' due to unhandle exception..while converting it to .exe file

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Have you tried to isolate your dependencies in a separate environment before converting the script to an exe file?
      Please create a virtual environment, install the packages for your project in that environment and then try to convert the py to exe again.

  • @nicholasciacca1201
    @nicholasciacca1201 Год назад

    Just a heads up, if the user inputs letters instead of number in the 'Amount' field, the code gives an error, and the stops running, therefore the user cant correct it and try again.

    • @CodingIsFun
      @CodingIsFun  Год назад +2

      Thank you for watching. I understand your point. It's not always possible to build a foolproof application in a 10-minute video. The goal of the video is to provide a starting point for viewers to enhance and develop their own application (including error handling)

  • @assiaben1220
    @assiaben1220 Год назад

    Hello sir thank you so much, it's really helpful.🧡
    How can I build different layouts for a larger contract with more fields and multiple windows while saving the information in the same ms-word? I made a rental deed template, and because my deed has a lot of fields to fill in, I made a function for each section that contains: layout, a window, a while loop with an event button, and context. When I save the information, it only fills the last section that I enter.
    I have, for example, an owner function, a tenant function, and functions for payment, term, designation, and so on. When I click the owner button, a window appears to allow me to enter owner information; when I click the tenant button, a window appears to allow me to enter tenant information. When I open the template, however, only the tenant informations are filled in.
    Do you have any ideas on how to do it?☺

    • @CodingIsFun
      @CodingIsFun  Год назад +1

      Thanks so much for watching the video and leaving a comment! Your request is definitely noted. However, I get a ton of requests for custom solutions and, as much as I'd love to help everyone out, I just don't have the time in my schedule to develop and test all of them. I hope you can understand. Happy Coding!

    • @assiaben1220
      @assiaben1220 Год назад

      @@CodingIsFun Thanks, Of sure, I understand, no problem. Best of luck.

  • @Commando244
    @Commando244 Год назад

    While using the executable file thru psgcompiler, I get the error: Errno2: no such file or directory (the directory listed in the error is not where I placed my file. I am using spyder by the way)

    • @CodingIsFun
      @CodingIsFun  Год назад

      Thanks for watching. Try to change this:
      document_path = Path(__file__).parent / "vendor-contract.docx"
      to this:
      document_path = Path.cwd() / "vendor-contract.docx"

    • @Commando244
      @Commando244 Год назад

      @@CodingIsFun that worked, but I’m not sure where it saved the file. I tried looking through my documents. Do I need to change the output path as well? Appreciate the help

    • @Commando244
      @Commando244 Год назад

      @@CodingIsFun that works, but now I don’t know where the output file is saved. Do I need to edit the output path as well? I appreciate your help

  • @johnwindsor5426
    @johnwindsor5426 2 года назад

    When I run exe file, the window popup, all data could be input. But when I generate word document, fail to run. No such file or directory...

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Please change the following:
      Replace this:
      document_path = Path(__file__).parent / "vendor-contract.docx"
      With this:
      document_path = Path.cwd() / "vendor-contract.docx"
      ..and try again! Thanks!

  • @excelgreatdmitri587
    @excelgreatdmitri587 2 года назад

    How do you list items

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Do you mean how to implement a drop down list? Please provide more details. Thanks!

  • @peppetime
    @peppetime 10 месяцев назад

    Ciao! grazie per il video , sei bravissimo e sto imparando molto da te ,vorrei comunque chiederti come fare a cambiare la cartella di destinazione del salvataggio del file word,non riesco a risolvere questo problema ,e non trovo molto materiale in rete ,ti ringrazio e approfitto per salutarti e salutare tutti!!

    • @CodingIsFun
      @CodingIsFun  10 месяцев назад

      Thanks for watching. It is explained in the video: 7:55 min

    • @peppetime
      @peppetime 10 месяцев назад

      @@CodingIsFun Grazie!!

  • @deejaysoulution
    @deejaysoulution 2 года назад

    @CodingIsFun
    you showed us how to save the values from the input fields into a word file.
    could you please show us how to do it vice versa? so that when I press a 'load'
    button the stored values from the .docx-file get inserted back to the proper text fields.
    I only get back the word "end" into all my text input fields. I must admit I used Tkinter but this
    shouldn't be the problem. Instead of 'doc.render(values)' I used for Tkinter 'doc.render(context)'
    and created a context like 'context = { "TextField1": entryExample1.get(1.0, END) }'to make a reference for the Word-Application. This works so far to save something. But when I use 'context = { "TextField1": entryExample1.insert(1.0, END) }' I only get back the strings "end" into my input fields?

    • @CodingIsFun
      @CodingIsFun  2 года назад +1

      I am unsure if that is possible, as I assume that the rendered Word Document has no 'connection/memory' to the original template. I might be mistaken, but I am missing the time to search the internet for a solution. Thanks for your understanding!

    • @deejaysoulution
      @deejaysoulution 2 года назад

      @@CodingIsFun OK. Nevertheless thank you very much for your kindness and answer!

  • @drunken87
    @drunken87 2 года назад

    Beginner here: When I run the script, I get the error: ModuleNotFoundError: No module named 'docxtpl'. I uninstalled and reinstalled docxtpl via the console with pip install / uninstall multiple times, but I still get the error. How can docxtpl be missing when it is istalled? Thx for the video :)

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Hard to tell from a distance. My closest guess is that you are getting this issue because you are trying to import a module of a library which is not installed in your virtual environment. If you have run 'pip install docxtpl' already, ensure to call your Python file from the same environment in which you installed the package. For example, in your IDE/text editor, you might have set a different Python environment for executing your script. Therefore, try to run your Python file also from the command prompt. If that does not work, try searching for the text of your error message on Google/StackOverflow. Happy Debugging!

    • @drunken87
      @drunken87 2 года назад

      @@CodingIsFun Thx for your reply, like you said I bypassed the whole search by installing Anaconda and installing docxtpl there. N.B. for this problem with the different environments there is no good answer on the internet a beginner might understand :/

  • @nicholasciacca1201
    @nicholasciacca1201 Год назад

    whenever I run the exe file, it says no such file or directory [Errno 2] :(

    • @CodingIsFun
      @CodingIsFun  Год назад +1

      Change this:
      document_path = Path(__file__).parent / "vendor-contract.docx"
      to this:
      document_path = Path.cwd() / "vendor-contract.docx"
      and try again. Thanks!

    • @nicholasciacca1201
      @nicholasciacca1201 Год назад

      @@CodingIsFun Worked like a charm thank you!

  • @j_a_g_g_u
    @j_a_g_g_u 2 года назад

    hi ...... im getting an error in this one but i couldnt rectify it..... i took ah screenshot of the error. In it its given that
    line 2, in
    event, values = window.read()
    you have tried 100 times to read a closed window
    you need to DD check for event == WIN_CLOSED
    can you help me out?

    • @CodingIsFun
      @CodingIsFun  2 года назад +1

      Thanks for watching. Unfortunately, with that bit of information, I cannot help you. You might want to take some time to write down which line of code is causing the error; let me know if you have modified the code from the tutorial, explain in more depth what you did to troubleshoot the problem and provide some more context. Thanks!

    • @j_a_g_g_u
      @j_a_g_g_u 2 года назад

      Do you have any social media to text.... If yes I can send you screenshots

    • @CodingIsFun
      @CodingIsFun  2 года назад

      @@j_a_g_g_u Feel free to join our discord. The link is in the description

    • @j_a_g_g_u
      @j_a_g_g_u 2 года назад

      @@CodingIsFunThis where the error comes..... its shows " trying to open a closed file ... you need to add a check event == WIN_CLOSED" like that
      window = sg.Window("ECS FORM", layout, element_justification="right")
      while True:
      event, values = window.read()
      if event == sg.WIN_CLOSED or event == "Exit":
      break
      if event == "Create Contract":
      values["DATE"] = today.strftime("%Y %m %d")
      doc.render(values)
      output_path = Path(__file__).parent / f"{values['PHONE']}.docx"
      doc.save(output_path)
      sg.popup("File saved", f"File has been saved here: {output_path}")
      Balance code is same as your ..... only the heading changes........ its showing error in reading the input from user and updating it......

    • @CodingIsFun
      @CodingIsFun  2 года назад

      @@j_a_g_g_u you forgot window.close() at the bottom

  • @saikrishna4710
    @saikrishna4710 2 года назад

    Its not working to create different muliple doc template with same data. if possible make a video on that bro.

    • @CodingIsFun
      @CodingIsFun  2 года назад

      What does not work? Please provide more information! Thanks!

  • @kalikaupadhyaya
    @kalikaupadhyaya Год назад

    Hello sir ! your video is very impressive . could you please paste all above code here

    • @CodingIsFun
      @CodingIsFun  Год назад

      Hello Sir. Please find it on GitHub. The links are in the description of the video. Happy Coding!

  • @lennycecile3775
    @lennycecile3775 2 года назад

    Great video,but is it possible to replicate these funtions using tkinter?tnk u

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Thannks! Yes, of course! In fact, PySImpleGUI is built on top of Tkinter.

    • @lennycecile3775
      @lennycecile3775 2 года назад

      @@CodingIsFun thanks for the reply.im trying to create my own entry form software for work,and i cant seem to make it read my input in the input field,hence not replacing the placeholders.any tips(im new to coding.😅)

    • @CodingIsFun
      @CodingIsFun  2 года назад

      @@lennycecile3775 Unfortunately, with that bit of information, I cannot help you. You might want to take some time to write down which line of code is causing the error; let me know if you have modified the code from the tutorial, explain in more depth what you did to troubleshoot the problem and provide some more context. Thanks!

  • @sergeysergey421
    @sergeysergey421 2 года назад

    Good. But better use excel file, as data base....

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Thanks for watching. Then you might want to check out the following video: ruclips.net/video/Zy9sx4GvjUY/видео.html

  • @Lyleb1231
    @Lyleb1231 Год назад

    I am getting an error typing in: pip install docxtpl. SyntaxError: invalid syntax
    >>> pip install docxtpl
    File "", line 1
    pip install docxtpl
    ^^^^^^^

    • @CodingIsFun
      @CodingIsFun  Год назад

      Thanks for watching. Where did you execute that command?

    • @Lyleb1231
      @Lyleb1231 Год назад

      @@CodingIsFun From Python 3.11.4 and I tried pycharm.

    • @CodingIsFun
      @CodingIsFun  Год назад

      @@Lyleb1231 Try to install the library via Terminal/CMD as shown in the video

  • @damako.1
    @damako.1 2 года назад

    I cant imstall pip docxtpl

  • @user-kj7cr5bs6j
    @user-kj7cr5bs6j Год назад

    pip is not recognized ? why

    • @CodingIsFun
      @CodingIsFun  Год назад

      Do you have Python and pip installed?

    • @user-kj7cr5bs6j
      @user-kj7cr5bs6j Год назад

      @@CodingIsFunOuch I understand now thanks

  • @user-kj7cr5bs6j
    @user-kj7cr5bs6j Год назад

    simple example .py did not work ? did not turn ?

    • @CodingIsFun
      @CodingIsFun  Год назад

      Hey there, thanks for watching the video! I'm sorry I can't help you with your problem based on the information you provided. To give me a better idea of what's going on, it would be super helpful if you could write down which line of code is causing the error, let me know if you modified the code from the tutorial, and explain in more detail what you did to troubleshoot the problem. Don't forget to also give me some context about your setup and environment.
      If you're having trouble figuring things out, another option is to join our Discord server at pyhtonandvba.com/discord. You can ask your question there and maybe someone in the community can help out.
      Thanks for understanding.

    • @user-kj7cr5bs6j
      @user-kj7cr5bs6j Год назад

      I mean 1:27

  • @nicolasdekeyser9322
    @nicolasdekeyser9322 2 года назад

    I keep getting 'psgcompiler : The term 'psgcompiler' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.' when I try to run psg compiler. When I pip install psg it says it's already satisfied in the following location: users
    ame\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\etcetera. I've tried manually opening this file location, but I can't find the file 'appdata'. What do I do?

    • @CodingIsFun
      @CodingIsFun  2 года назад

      Thanks for watching and for your question. Hard to tell from a distance why you are facing an error. Sorry that I cannot help.

  • @philmillington5025
    @philmillington5025 2 года назад

    Hi reference [vendor-contract-gui.py] My Doc [output_path] File Ends up in a Temp folder when I create the exe file. As soon as the script stop running it get deleted. Can you help me with this problem I think the problem is with the ..
    [output_path = Path(__file__).parent]
    when the exe is excuted it goes to my Temp folder and then get deleted by Windows.
    ps it works fine when I run it as a script but te exe file save it to a temp folder.

    • @CodingIsFun
      @CodingIsFun  2 года назад +1

      Thanks for watching. Please replace "Path(__file__).parent" with "Path.cwd()" and try again. Hope it helps! Happy Coding!

    • @philmillington5025
      @philmillington5025 2 года назад +2

      Hi thanks for taking the time to reply to my query. I have replaced the code you suggested and it now works fine. I am just started to learn Python having coded in VBA for years and was looking for a new challenge. Keep up the good work, your videos and really helpful Regards Phil

  • @fsilveyra6469
    @fsilveyra6469 Год назад +1

    Hello! I am having just one problem with the last step:
    When I try to run the .exe file, this error pop-up appears:
    drive.google.com/file/d/1u7Kj3fNmMfFJlTeZAeSdnPtlYyxAwAjN/view?usp=sharing
    All the other steps worked perfectly, I can even run the program with Python. Can you please help me? I would really appreciate it :)

    • @CodingIsFun
      @CodingIsFun  Год назад

      Thank you for watching my video! I'm sorry that the Python code I provided doesn't seem to be working on your machine.
      I suggest creating a separate virtual environment and installing the required libraries there. This will ensure that you have a clean, isolated environment for running your Python code, which can help avoid conflicts with any other libraries that you have installed on your machine.
      If that doesn't work, another thing you could try is using a different version of Python. For example, you could try using Python 3.8.5 instead of the version of Python that you are currently using. This might help resolve any compatibility issues that you are experiencing.