Python Forum
Attibute Error: Two methods in a class, one I can reach, the other not (phantom file?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Attibute Error: Two methods in a class, one I can reach, the other not (phantom file?
#5
The problem was that I keep the programs and the classes at the same level.
I found the solution in creating a run file just above the directories:

top directory
run.py
import programs.my_prog
programs.my_prog.main()
{/python]
    programs
[python]
       from classes.myclass import ...     
classes

This link helps:
https://stackoverflow.com/questions/2325...-in-python

I think this solves the problme
Reply


Messages In This Thread
RE: Attibute Error: Two methods in a class, one I can reach, the other not (phantom file? - by GaryKuipers - Aug-28-2018, 02:32 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Class test : good way to split methods into several files paul18fr 4 491 Jan-30-2024, 11:46 AM
Last Post: Pedroski55
  Structuring a large class: privite vs public methods 6hearts 3 1,085 May-05-2023, 10:06 AM
Last Post: Gribouillis
  access share attributed among several class methods drSlump 0 1,071 Nov-18-2021, 03:02 PM
Last Post: drSlump
  a function common to methods of a class Skaperen 7 2,638 Oct-04-2021, 07:07 PM
Last Post: Skaperen
  Helps with reading csv file - 3 methods hhchenfx 4 3,301 May-13-2021, 04:15 AM
Last Post: buran
  Listing All Methods Of Associated With A Class JoeDainton123 3 2,371 May-10-2021, 01:46 AM
Last Post: deanhystad
  too many methods in class - redesign idea? Phaze90 3 2,518 Mar-05-2021, 09:01 PM
Last Post: deanhystad
  Special Methods in Class Nikhil 3 2,302 Mar-04-2021, 06:25 PM
Last Post: Nikhil
  I have an index error inline 76 but I write the program in a way that cant reach tha abbaszandi 2 2,078 Nov-13-2020, 07:43 AM
Last Post: buran
  cant able to make methods interact with each other in the class jagasrik 2 1,815 Sep-16-2020, 06:52 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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