Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Open file
#1
Hi. I am trying to open a file in Python IDLE but nothing happends besides theese signs and letters appearing:

Does somone know why this is happening? 
Kind regards,
 Alex

Moderator sparkz_alot:
Moved to proper location.  Added spoiler tags.
Reply
#2
Posting a big slab of bytecode isn't going to get you anywhere.

Post:
  • Your code
  • Your error traceback verbatim, complete!
  • Where you think the problem may lie (if you have a clue)
Reply
#3
Is the file extension .pyc ? If it is, this is compiled python source code. You need file with .py at the end
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#4
Sorry, I did not know how else to formulate the question as I have noe clue whatsoever why the bytecode is appearing. Yes, the file ends with .py
Reply
#5
This file is compiled python. The original extension was .pyc and was copied to a .py or the extension changed.
You need to find the original .py file to run the code.
If you can't find the original python code, you can try to decompile with https://pypi.python.org/pypi/uncompyle6
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Open/save file on Android frohr 0 278 Jan-24-2024, 06:28 PM
Last Post: frohr
  file open "file not found error" shanoger 8 938 Dec-14-2023, 08:03 AM
Last Post: shanoger
  How can i combine these two functions so i only open the file once? cubangt 4 804 Aug-14-2023, 05:04 PM
Last Post: snippsat
  I cannot able open a file in python ? ted 5 3,045 Feb-11-2023, 02:38 AM
Last Post: ted
  testing an open file Skaperen 7 1,300 Dec-20-2022, 02:19 AM
Last Post: Skaperen
  I get an FileNotFouerror while try to open(file,"rt"). My goal is to replace str decoded 1 1,360 May-06-2022, 01:44 PM
Last Post: Larz60+
  Dynamic File Name to a shared folder with open command in python sjcsvatt 9 5,876 Jan-07-2022, 04:55 PM
Last Post: bowlofred
  Open an excel file Newbie1114 1 2,296 Jun-16-2021, 09:11 PM
Last Post: Gribouillis
  How to open MIDI-file and get events in a list? philipbergwerf 7 4,848 May-29-2021, 08:24 AM
Last Post: j.crater
  Error on open of file created with tempfile.TemporaryDirectory() Brian177 4 6,143 Apr-05-2021, 07:12 PM
Last Post: Brian177

Forum Jump:

User Panel Messages

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