Skip to content

Commit cfed415

Browse files
committed
Fix for downloading jobs and occupations taxonomy files
1 parent c0c5400 commit cfed415

2 files changed

Lines changed: 23 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22

33
## [Unreleased]
44

5+
### Fixed
6+
7+
Fixed crash trying to get the `occupations-taxonomy` and `jobs-taxonomy` reference files:
8+
9+
```python
10+
from ravenpackapi import RPApi
11+
api = RPApi(product="edge")
12+
13+
occupations = api.get_entity_type_reference("occupations-taxonomy")
14+
occupations.write_to_file("occupations-reference.csv")
15+
16+
jobs = api.get_entity_type_reference("jobs-taxonomy")
17+
jobs.write_to_file("jobs-reference.csv")
18+
```
19+
520
## [v1.1.5] (2024-06-28)
621

722
### Changed

ravenpackapi/models/reference.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,15 @@ def _parse_lines(self):
152152
yield headers
153153
for line in iterator:
154154
parsed_line = parse_csv_line(line)
155-
(
156-
rp_entity_id,
157-
entity_type,
158-
data_type,
159-
data_value,
160-
range_start,
161-
range_end,
162-
) = parsed_line
163155
if self.store_in_memory:
156+
(
157+
rp_entity_id,
158+
entity_type,
159+
data_type,
160+
data_value,
161+
range_start,
162+
range_end,
163+
) = parsed_line
164164
# we keep track of all the parsed entities just for rpa
165165
if rp_entity_id not in self._entities:
166166
self._entities[rp_entity_id] = entity = RpEntityReference(

0 commit comments

Comments
 (0)