Использую Intellij IDEA.
При создании интерфейса IDE выдает ошибку:
Unable to parse template «Interface»
Error message: This template did not produce a Java class or an interface
Как пофиксить это?

- 1 ответ 1
- Comments
- javaExploit commented Aug 1, 2017
- This comment has been minimized.
- wagner-certat commented Aug 2, 2017
- This comment has been minimized.
- seraphyong commented Aug 3, 2017 •
- This comment has been minimized.
- wagner-certat commented Aug 3, 2017
- This comment has been minimized.
- wagner-certat commented Aug 3, 2017
- This comment has been minimized.
- mdiviesti commented Sep 11, 2017
- This comment has been minimized.
- ldbfpiaoran commented Nov 24, 2017
- ExplodingBanana
- joiner
- ExplodingBanana
- Tempo
- ExplodingBanana
- Tempo
1 ответ 1
Похожая проблема встречается у многих людей, но не с интерфейсами, а с классами.
Вот несколько решений:
1)Попробуйте перезапустить или обновить Идею.
2)Попробуйте перезапустить Идею используя Ctrl + Shift + A → Invalidate Caches / Restart
3)Попробуйте создать класс, а потом в java файле напишите не class , а interface .
4) Решения проблем с классами. Возможно, вам что-то поможет:
Перейдите в меню File → Settings → Editor → File and code templates, выберите «Interface» на вкладке «Files» и напишите
Добавьте следующую строку в свой пользовательский параметр виртуальной машины (studio.vmoptions).
В крайнем случае вы можете переустановить IntelliJ IDEA(все ваши проекты сохранятся). Если просто переустановка не поможет, сделайте полную переустановку. Т.е. удалите идею, удалите остаточные файлы, удалите настройки, можете почистить реестр. А потом выполните установку.
Comments
Copy link Quote reply
javaExploit commented Aug 1, 2017
Hi, there.
I run the sample code in your python docs pages.
However, it returned an error.
Most of time the api will return errors although sometimes it can successfully execute. And I really don’t know why.
My os is Win10 and I also tried it at Win7. Doesn’t work too.
This comment has been minimized.
Copy link Quote reply
wagner-certat commented Aug 2, 2017
Could you please show the exact call (without key obviously) and the full traceback please?
This comment has been minimized.
Copy link Quote reply
seraphyong commented Aug 3, 2017 •
I have the same error. @wagner-certat .
those are my code:
import shodan
import json
api = shodan.Shodan(SHODAN_API_KEY)
query = «port:80»
try:
results = api.search(query)
print(«Results found: %s»%results[‘total’])
for result in results[‘matches’]:
print(‘IP: %s’ % result[‘ip_str’])
except shodan.APIError as e:
print(‘Error: %s’ % e)
This comment has been minimized.
Copy link Quote reply
wagner-certat commented Aug 3, 2017
Works for me. Which python-version are you using on which OS? Which shodan version?
This comment has been minimized.
Copy link Quote reply
wagner-certat commented Aug 3, 2017
And please show a traceback, that really helps 😉
This comment has been minimized.
Copy link Quote reply
mdiviesti commented Sep 11, 2017
FYI: I was running into a similar issue on Mac with Python 3 and shodan installed via pip3.
In my case, particularly, I was looping through a set of products that exist on my network and hitting the exploit endpoint to search for vulnerabilities.
Once I added a slight delay between requests, I no longer received the error.
I’m not sure if this helps any of the reported cases above but, hope it will.
This comment has been minimized.
Copy link Quote reply
ldbfpiaoran commented Nov 24, 2017
@mdiviesti yes I use python3 also have the status. so I want write a script use python3 of shodan api.
But I can’t find the shodan api about shodan search equipment. Can you help me?
ExplodingBanana
Новичок
![]()
joiner
Модератор
Re: [Ошибки] GUIGetMsg(). Error: Unable to parse line
Справку посмотри как проводится опрос событий окна
ExplodingBanana
Новичок
- Автор темы
- #3
Re: [Ошибки] GUIGetMsg(). Error: Unable to parse line
![]()
Tempo
Скриптер
Re: [Ошибки] GUIGetMsg(). Error: Unable to parse line
ExplodingBanana
Новичок
- Автор темы
- #5
Re: [Ошибки] GUIGetMsg(). Error: Unable to parse line
![]()
Tempo
Скриптер
По сути вы пытаетесь проверить значение еще не объявленной переменной и условие не самое лучшее для вашего случая
Проще будет так если нужно лишь ожидание закрытия окна
Или пример полноценного цикла опроса нужных элементов