#๐Ÿ”’ Cannot append more input - txt file!

16 messages ยท Page 1 of 1 (latest)

sudden flare
#

I use PyCharm as my IDE. I try to append more and more information to my txt file, but it doesn't do anything. How to fix that? ๐Ÿค”

void heathBOT
#

@sudden flare

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

old basalt
#

seems to be a lot of hits on google about increasing pycharms txt file size limit..
i dont use pycharm so I cant suggest a absolute fix for your version

marsh ermine
#

It does add stuff to the file, it's just that PyCharm cannot view it, as the info bar says

#

Use console to view your output, or some gui text editor that can handle big files

If on windows, do not use Notepad - it's really really bad for big files.
For sure Notepad++ will be able to handle it, I viewed (and even searched) files with tens millions of lines there

sudden flare
marsh ermine
#

Before writing to file you can print len(valid_urls) and see if it matches number of lines
But without seeing full code, we can't help with anything else.

sudden flare
marsh ermine
#

Then it's correct

#

If you expect more, then it's how you make valid_urls that needs fixing

sudden flare
#

Is it possible that with every execution of the program, the old file gets erased and on top of that, the new file will be created? If so, why does it happen when using a for append? ๐Ÿค”

marsh ermine
#

Make sure you don't get any other opening with w anywhere in the code.

#

It would be easier if you showed us some code

sudden flare
#

I worked suddenly. I don't know what I changed ๐Ÿ˜ฒ

void heathBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.