Skip to content
Sign upLog in
← Back to Community

Python error in importing

Profile icon
Leroy01010

my project isn't working i tried everything but it's still broken! I was told to go to repl.it to code something for my sis who is doing a test plz help 'cause my sister need too practise

the verbal and maths throw biiigggg errors

Answered by badst [earned 5 cycles]
View Answer
Voters
Profile icon
BidurAdhikary
Profile icon
Leroy01010
Comments
hotnewtop
Profile icon
badst

choose2 & choose3 are not defined, your indenting is messed up.

Profile icon
Leroy01010

@pepelaugh
i have the two files connected though

Profile icon
badst

@Leroy01010
You're using a circular import. try
from MODULE import EXAMPLE
or from MODULE import *

Profile icon
Leroy01010
Profile icon
Leroy01010

it still doesn't work

@pepelaugh

Profile icon
badst

@Leroy01010
You've got it wrong, you import math and verbal to main. There's no need to include main in those files. Invite me and ill fix it if you want :D

Profile icon
Leroy01010
Profile icon
[deleted]

@Leroy01010
you never made if statement for option non-verbal. Fix that and it may help. If this comment helped you please mark it as the answer. Thanks!

Profile icon
Leroy01010

Wait i mean the verbal and maths throw errors

@HeadSucksAtLife

Profile icon
[deleted]

Ohhh lemme look more into it.

@Leroy01010

Profile icon
PattanAhmed

@Leroy01010
Hi,
Can you tell the line numbers?
Thanks!

Profile icon
Leroy01010
Profile icon
PattanAhmed

@Leroy01010
Tell me the line numbers.
which the error is coming up

Profile icon
Leroy01010
Traceback (most recent call last): File "main.py", line 3, in <module> import verbal File "/home/runner/11/verbal.py", line 1, in <module> import main File "/home/runner/11/main.py", line 35, in <module> answer = verbal.Q1V() AttributeError: partially initialized module 'verbal' has no attribute 'Q1V' (most likely due to a circular import)

@PattanAhmed

Profile icon
PattanAhmed

@Leroy01010
ok
but bro, this error doesn't seems the error that is in title

Python error inconsitent uses of tabs

Profile icon
Leroy01010

oh shoot sorry

@PattanAhmed

Profile icon
PattanAhmed
Profile icon
Flyingcrabs

you just did a thing wrong hard to say

Profile icon
Flyingcrabs

i know i know

Profile icon
RYANTADIPARTHI

This happens all the time for me. All you need to do is, comment the code which is giving the error. And write the same commented code again.

Profile icon
Leroy01010

but it's more than one code that gives the error

@RYANTADIPARTHI

Profile icon
RYANTADIPARTHI

@Leroy01010
yeah, well, the only thing to do is to comment out, and write again. Even refreshing doesn't work against it.

Profile icon
Leroy01010
Profile icon
RYANTADIPARTHI

@Leroy01010
great! Can you please mark my answer? Thanks!

Profile icon
Leroy01010

if u press 3 it still doesn't work

@RYANTADIPARTHI

Profile icon
RYANTADIPARTHI

@Leroy01010
yeah, so this error is not an inconsistent tab error, that's done, this is because there is nor such thing as Q1M(), That's wrong, so you need to fix that, the importing, and usage of that.

Profile icon
Leroy01010

hm i don't know how to fix it though

@RYANTADIPARTHI

Profile icon
RYANTADIPARTHI

@Leroy01010
well, sorry, but i don't know the verbal module, so I can't do it.

Profile icon
Leroy01010
Profile icon
RYANTADIPARTHI

@Leroy01010
yeah, sry.

Profile icon
Leroy01010

plz heeelllpp

Profile icon
Flyingcrabs

well you need to come online to show you or not online you [email protected]

Profile icon
Leroy01010
Profile icon
Flyingcrabs

more prob and i check your scratch [email protected]

Profile icon
Leroy01010