# Generating Facets - Squirro Trainee Engineer Question

**URL:** https://forum.squirro.com/t/generating-facets-squirro-trainee-engineer-question/185
**Category:** Training with Squirro
**Tags:** data-loader, facets
**Created:** [July 4, 2022, 4:42pm UTC](https://forum.squirro.com/t/generating-facets-squirro-trainee-engineer-question/185 "2022-07-04T16:42:36Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Lauren](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.squirro.com/lauren/32/18_2.png) [@Lauren](https://forum.squirro.com/u/Lauren)
#### Post date: [July 4, 2022, 4:42pm UTC](https://forum.squirro.com/t/generating-facets-squirro-trainee-engineer-question/185/1 "2022-07-04T16:42:36Z")

</div>

Currently finishing the Squirro Engineering training, however I encountered a problem with  
generating facets. Concretely, stuck on “Generating preview” step while adding data from custom created _fakenews\_plugin ._

However, uploading data with **squirro\_data\_load** command works completely fine (the same as in tutorial).

I also compared the code with the one in [training/data\_loader/8\_fakenews at master · squirro/training · GitHub](https://github.com/squirro/training/tree/master/data_loader/8_fakenews) repo, It seems that all should work, but it does not.

**So the question is how I should debug this kind of problem?**  
Can I have access to logs from squirro project or instance? Or how this should be handled in a proper way?

---

<div class="post-metadata">

### Author: ![tonibirrer](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.squirro.com/tonibirrer/32/6_2.png) [@tonibirrer](https://forum.squirro.com/u/tonibirrer)
#### Post date: [July 5, 2022, 8:55pm UTC](https://forum.squirro.com/t/generating-facets-squirro-trainee-engineer-question/185/2 "2022-07-05T20:55:35Z")

</div>

Hi Lauren,

I’d say the best bet to debug this from the web ui would be to click the dial menu, then click on “Server” and then in the left side menu select Log Files

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/squirro/original/1X/930f1bf6bf36f2c5cddbe78a82876c92678b285c.png)

From the pulldown menu, I’d select datasource.log, since this is in related to a datasource and the preview will be done by the datasource python service of Squirro.

I’d select WARNING as the level.

Ideally you do this all in a new tab and then you retry the preview and then press SHOW LOG right after.  
If an error or warning happens you’ll be able to see these.

Even if the issue is with the facet creation, which i’m not so sure, it the datasource service would still get an error from the topic service, which ultimately will create the facets.

Once you get an error, please post it here for further analysis.

---

<div class="post-metadata">

### Author: ![daren.sin](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.squirro.com/daren.sin/32/85_2.png) [@daren.sin](https://forum.squirro.com/u/daren.sin)
#### Post date: [July 6, 2022, 9:33am UTC](https://forum.squirro.com/t/generating-facets-squirro-trainee-engineer-question/185/3 "2022-07-06T09:33:55Z")

</div>

Hi Lauren,

From the logs, I can see that because the field “API Endpoint” is empty, the plugin goes to fetch data from `/news/sport?...`, instead of `https://fakenews.squirro.com/news/sport?...`.

Perhaps the “API Endpoint” field can be made `required`, or you could specify a default endpoint in `getArguments()`.

Hope this helps!
