Please ignore secret bonuses. Secret tests do NOT award bonus. Max hw grade is 30+2 bonus efficiency

Do you need help?

Notice Board

Impossibile aprire file png

j
jacopoRufini (440 points)
8 12 17
in Es1 by (440 points)
closed by
Ciao ragazzi, ho scaricato l'hw3 e ho provato a vedere come funzionasse il modulo immagini. Il problema è che mi ritorna questo errore su console con il semplice comando " img = load("lst0.png") ". L'errore è il seguente:

Traceback (most recent call last):

  File "program01.py", line 33, in <module>

    img = load("lst0.png")

  File "/Users/jacopo/Desktop/homework3/es1/immagini.py", line 13, in load

    with open(fname, mode='rb') as f:

FileNotFoundError: [Errno 2] No such file or directory: 'lst0.png'

Mi sembra abbastanza assurdo che non trovi il file. Qualcuno ha avuto lo stesso problema?
605 views
closed with the note: risolto (typo)

1 Answer

Best answer
andrea.sterbini (207940 points)
756 1270 2377
by (208k points)
selected by
Il nome del file è sbagliato, controlla.
andrea.sterbini (207940 points)
756 1270 2377
by (208k points)
In windows potrebbe avere le maiuscole diverse?
Hai scambiato una i maiuscola per una L minuscola?
j
jacopoRufini (440 points)
8 12 17
by (440 points)
A mia discolpa posso dire che I e l sono molto simili su mac os .. (facepalm)