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

Do you need help?

Notice Board

Per partecipare al corso di Fondamenti di programmazione 2023-24 loggatevi e attivatelo nella vostra pagina dei corsi preferiti. A quel punto il corso appare nel menù personale cliccando sul proprio avatar. Per i materiali degli anni precedenti seguite lo stesso metodo.

To join the Programming/Lab 2023-24 course, log-on and select it on the my courses page. It will appear on the personal menu of your avatar. For earlier years use the same method.

Problema Test HW

R
Riccardo_Di_Fabio (4780 points)
1 2 6
in HW2 by (4.8k points)
Quando vado a fare i test per il mio programma mi esce la scritta: "the import of 'zmq' is forbidden" e mi si blocca il programma, come posso risolvere?
363 views
closed

2 Answers

Best answer
E
Edoardo Allegrini (930 points)
1 6 8
by (930 points)
selected by
Prova ad eliminare nel file test_01.py in do_test()  la riga:

self.check_imports(allowed=['program01','_io']), \
R
Riccardo_Di_Fabio (4780 points)
1 2 6
by (4.8k points)
grazie mille ho risolto!
simonemignanelli (2130 points)
1 2 22
by (2.1k points)
Hai cercato di importare librerie o semplicemente ti da l'errore senza aver fatto nulla?

Se può aiutarti già è stata fatta una domanda simile

https://q2a.di.uniroma1.it/17304/errore-nel-lanciare-il-test

https://q2a.di.uniroma1.it/17216/errore-hw2req-quando-avvia-test_01-spyder-zmq-import-error?course=hw2-required/homeworks/fondamenti-di-programmazione-20-21
R
Riccardo_Di_Fabio (4780 points)
1 2 6
by (4.8k points)
ho aperto program01.py , test_01.py e ho avviato test_01.py semplicemente
R
Riccardo_Di_Fabio (4780 points)
1 2 6
by (4.8k points)
già visto, ma il problema persiste!
I
Ionut_02 (4400 points)
4 4 18
by (4.4k points)
guarda se sei nella directory corretta